eolymp
bolt
Try our new interface for solving problems
Problems

Reverse the number

Reverse the number

Time limit 1 second
Memory limit 128 MiB

Last week the students in the evening ate kefir and ropes, but at yesterday's planning meeting the teachers decided that the ropes are not good, so today with kefir the students will get the numbers (the same ones that arifmetyane dig in a galaxy far far away). You need only to fry them a little (numbers of course). Assistant of the chief cook Clara fries n-bit number x. Clara already fried it on one side, but the second side is still slightly damp. Your task is to turn the number to another side. Reverse the number means to change the first bit with the last, the second - with the penultimate and so on.

Input data

The first line contains number n (1n30), the second line contains number x (1x10^9).

Output data

Print the reversed number x.

Examples

Input example #1
3
6
Output example #1
3
Input example #2
4
1
Output example #2
8