Олимпиадный тренинг

Задача 44575. Reset all beats except the last


Задача

Темы: Битовые операции

Write a program that resets (sets to 0) all bits of N except the last k bits.  Display the resulting number.

Arithmetic operations cannot be used in the program, only bit operations must be used!

Input

Given an integer N and a natural number k.


Output

Display the number obtained after the bits have been reset.

 

Examples
# Input Output
1 5 1 1
 


 
Запрещенные операторы:+;*;/;%;bin;[