CF486A.Calculating Function

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Calculating Function

For a positive integer n let's define a function f:

f(n) =  - 1 + 2 - 3 + .. + ( - 1)n**n

Your task is to calculate f(n) for a given integer n.

Input

The single line contains the positive integer n (1 ≤ n ≤ 1015).

Output

Print f(n) in a single line.

Note

f(4) =  - 1 + 2 - 3 + 4 = 2

f(5) =  - 1 + 2 - 3 + 4 - 5 =  - 3

Samples

4
2
5
-3

在线编程 IDE

建议全屏模式获得最佳体验