Reset the significant bits
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
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
Input #1
Answer #1
Submissions 5K
Acceptance rate 55%