Return the n-th value (0-indexed) of the reflected Gray code sequence, that is the number whose binary representation differs from the (n-1)-th value in exactly one bit.
Input: A JSON object {"n": <index into the Gray sequence>}.
Output: Return the n-th Gray code value.
Input: {"n":5}
Output: 7
Explanation: 5 XOR 2 = 7.Input: {"n":9}
Output: 13
Explanation: 9 XOR 4 = 13.0 <= n <= 10^15