1094: 阶乘和

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:253 Solved:129

Description

给定一个整数 $n$,请计算 $1! + 2! + ... + n!$ 的值。

比如 $n$ 为 $3$,$1! = 1$,  $2! = 2$, $3! = 6$, 所以结果为 $1+2+6$ 等于 $9$。

Input

一行,包含一个整数 $n$。

Output

输出结果。

Sample Input Copy

3

Sample Output Copy

9

HINT

数据范围:

$0 \lt n \le 10$

Source/Category