Given a non-negative integer n, return its complement obtained by flipping every bit within the width of its binary representation (leading zeros are not flipped). By convention the complement of 0 is 1.
Input: A JSON object {"n": <non-negative integer>}.
Output: Return the bitwise complement of n restricted to its bit-length.
Input: {"n":5}
Output: 2
Explanation: 101 within 3 bits flips to 010 = 2.Input: {"n":1}
Output: 0
Explanation: 1 flips to 0.0 <= n <= 10^9