Initially, Chef is at coordinate
on X-axis. For eachin order, Chef does the following:
- If Chef is at a non-negative coordinate, he moves
- ).
You are given the integer
. Find the final position of Chef on the X-axis afteroperations.
Input Format
- The first line of input contains an integer
- .
Output Format
For each test case, output in a single line the final position of Chef on the X-axis after
operations.
Constraints
Sample Input 1
3
1
2
3
Sample Output 1
-1
1
-2
Explanation
Test case
: Initially, Chef is at coordinate on X-axis. As is non-negative, during the first operation Chef moves step backward and reaches the coordinate.
Test case
: Chef is at coordinate on X-axis after the first operation. As is negative, during the second operation Chef moves steps forward and reaches the coordinate .
ConversionConversion EmoticonEmoticon