Problems

# Reverse the number

# Reverse the number

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

The first line contains number **n** (**1** ≤ **n** ≤ **30**), the second line contains number **x** (**1** ≤ **x** ≤ `10`

).^{9}

#### Output

Print the reversed number **x**.

Input example #1

3 6

Output example #1

3

Input example #2

4 1

Output example #2

8