3124: 1~N的阶乘和

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:2 Solved:0

Description

求Sn=1!+2!+3!+4!+5!+…+n!之值,其中n是一个数字。


提示:n的取值比较大,Sn需要定义成long long型;

Input

输入一个整数N

Output

输出一个数字,表示1~N的阶乘和

即:Sn=1!+2!+3!+4!+5!+…+n!


提示:如使用printf,输出则要使用%lld

Sample Input Copy

5

Sample Output Copy

153

HINT