Problem1203--求阶乘的和

1203: 求阶乘的和

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

给定正整数n,求不大于n的正整数的阶乘的和(即求1!+2!+3!+...+n!)

Input

输入有一行,包含一个正整数n(1 < n < 12)。

Output

输出有一行:阶乘的和。

Sample Input Copy

5

Sample Output Copy

153

HINT

n!=1*2*3*...*n。
如4!=1*2*3*4=24

Source/Category