Last week, in the evening, the students used to have kefir and ropes together, but at yesterday's meeting, the teachers decided that ropes are a thing of the past. Therefore, today, along with kefir, the students will be given numbers (the same numbers that arithmeticians dig up in a galaxy far, far away). All that's left is to fry them a little (the numbers, of course). Clara, the assistant to the head chef, is frying an -bit number . Clara has already fried it on one side, but the other side is still slightly raw. Your task is to flip the number to the other side.
To reverse the number means to swap the first bit with the last, the second bit with the second-to-last, and so on.
The first line contains the number (1 \leq n \leq 30).
The second line contains the number (1 \leq x \leq 10^9).
Output the reversed number .
Example 1
Example 2