Reset the significant bits#454

Reset the significant bits

1 second
64 megabytes
Very easy (≈850)

Given integer а and positive integer k. Find the number that contains only the last k bits of а (i.e. reset all bits of а except the last k bits).

Input

One line contains two numbers a and k (0 ≤ a ≤ 10^9).

Output

Print the number a with reseted bits except the last k.

Examples

Example 1

Loading
Loading