1146: 【循环嵌套】挑战求和4

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

Description

  输入一个正整数n,求

1!-2!+3!-4!+……+N!的结果.

Input

一个正整数n

Output

结果

Sample Input Copy

3

Sample Output Copy

5

HINT

5=1-(1*2)+(1*2*3)