The sum from 1 to n#1621

The sum from 1 to n

1 second
128 megabytes
Medium

The sum of all integers from to can be calculated by a clever method. We divide all the numbers into pairs: and , and , and , and so on. The sum of each pair is . The number of such pairs is 100/2 = 50. Therefore, the sum equals (1 + 100) \times 100 / 2. The same formula works for an odd number of terms; for example: 1 + 2 + 3 = (1 + 3) \times 3 / 2 = 6.

Input

One integer . The number can be negative.

Output

Print the sum of all integers from to . It is guaranteed that the sum fits into a -bit signed integer type.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading

Note

If n = -3, then the sum is 1 + 0 - 1 - 2 - 3 = -5.