#C1533. Encoded Integer by Binary Reversal
Encoded Integer by Binary Reversal
Encoded Integer by Binary Reversal
Alice has a unique method of encoding integers. Given an integer \(N\), she first converts it into its binary representation, then reverses the binary string, and finally converts the reversed binary back into a decimal number. Formally, if the binary representation of \(N\) is \(B(N)\), then the encoded integer is defined as:
\[ \text{encoded_integer}(N)=\text{int}\Big(\text{reverse}(B(N))\Big) \]
Your task is to implement this encoding method. The program should read an integer from standard input and output its encoded value to standard output.
inputFormat
The input consists of a single line containing a non-negative integer \(N\) (\(0 \le N \le 10^9\)).
outputFormat
The output is the encoded integer obtained by reversing the binary representation of \(N\) and converting it back to a decimal number.
## sample1
1