Problem D: 阶乘之和

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:36 Solved:16

Description

输入一个数n(n<=50),计算S=1!+2!+3!+4!+...+(n-1)!+n!

Input

一个正整数n

Output

阶乘和

Sample Input Copy

4

Sample Output Copy

33