Given an integer n, if it has exactly one set bit (that is, it is a power of two) return the 1-indexed position of that bit. Otherwise return -1.
Input: A JSON object {"n": <integer>}.
Output: Return the 1-indexed position of the single set bit, or -1.
Input: {"n":16}
Output: 5
Explanation: 16 has one set bit at position 5.Input: {"n":6}
Output: -1
Explanation: 6 is 110 with two set bits, so return -1.-10^12 <= n <= 10^15