Modular Exponentiation

4

1 votes
Easy
问题

Given integers n and m, calculate:

m MOD (2n)

Input

The first line contains a single integer n (1 ≤ n ≤ 108).

The second line contains a single integer m (1 ≤ m ≤ 108).

Output

Output a single integer — the value of m MOD 2n

Input

1

58

Output

0

Explanation: 

In the example, 58 is divisible by 21 = 2 without remainder, and the answer is 0.

样本输入
4
42
样本输出
10
时间限制: 0.2
内存限制: 256
源文件限制:
说明

In the example, the remainder of division of 42 by 24 = 16 is equal to 10.

Contributers:
Editor Image

?