Given an integer, please invert the number of bits in each number and get a new number. The new number should also meet the common form of integers, that is, unless the given original number is zero, the highest number of the new number of new numbers obtained after the reversal should not be zero (for example: input -380, output -83)
Input a total of 1 lines, an integer N.
Output a total of 1 rows, an integer, indicating the new number after inversion.
123
321
-1,000,000,000<=N<=1,000,000,000。
NOIP2011 普及组 reverse