#3315. C++-循环for-计算S=1+2-3+4-5+6-...+(或-)n结果并打印(1<=n<=1000000000000)

C++-循环for-计算S=1+2-3+4-5+6-...+(或-)n结果并打印(1<=n<=1000000000000)

Background

Description

计算S=1+2-3+4-5+6-...+(或-)n结果并打印(1<=n<=1000000000000)

n为输入值

Format

Input

Output

Samples

1000000000000
500000000002
99999999999
-49999999998
5
-1

Limitation

1s, 1024KiB for each test case.