Negate a Number
Easyjava
Read an integer and print its negation using the unary minus operator.
Input: one integer.
Output: one line — the number with its sign reversed (0 stays 0).
Example 1
Input
5
Output
-5
Example 2
Input
-3
Output
3
- -1000000000 <= n <= 1000000000
Hint 1
Unary minus: -n reverses the sign.
Hint 2
-0 is just 0.
The unary minus operator returns the arithmetic negation of its single operand. Applying it to 0 leaves 0 unchanged.