Problems
Reset the significant bits
Reset the significant bits
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 ≤ 109
).
Output
Print the number a with reseted bits except the last k.
Input example #1
5 1
Output example #1
1