#t248. 阶乘和(sum)

阶乘和(sum)

Sum of Factorials

Problem Background

Special for beginners, ^_^

Problem Description

Given a positive integer N  (N≤200)N\;(N \le 200), let S=1!+2!+3!+⋯+N!S = 1! + 2! + 3! + \dots + N!. Here ! denotes factorial, i.e. $N! = 1 \times 2 \times 3 \times \dots \times (N-1) \times N$, for example: 3!=1×2×3=63! = 1 \times 2 \times 3 = 6.

Please write a program that, given a positive integer NN, outputs the value of SS.

Input Format

One integer NN.

Output Format

Output the value of SS.

Sample Input

4

Sample Output

33

Constraints

1s, 1024KiB for each test case.