In the binary-reflected Gray code, consecutive values differ in exactly one bit. The value at index n (0-indexed) is given by n XOR (n >> 1).
Output the Gray code value at index n.
Input format
One line: a non-negative integer n.
Output format
One line: the nth Gray code value.
Constraints
- 0 <= n <= 1000000000