Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Odd or Even

By RasheedAbid · Limits 3s, 512 MB

This is a very straight forward problem. For a given value of N your task is to find out the difference between the summation of all odd numbers and the summation of all even numbers. For example, if N is 7 then sum of all odds are (1+3+5+7) = 16 and sum of all even are (2+4+6) = 12. So the difference between the summation of all odd numbers and the summation of all even numbers is 4.

Input

The input contains a number N (0 ≤ N ≤ 1018).

Output

For each input N you should output the difference between the summation of all odd numbers and the summation of all even numbers.

Samples

InputOutput
1
1
InputOutput
7
4

Statistics

58% Solution Ratio

touhidurrrEarliest, Oct '18

md_moonFastest, 0.0s

TSRaihanLightest, 0 B

mdvirusShortest, 21B

Submit

 Uttara University Binary Fest: Intra University Programming Contest 2018 Sep '18 