You are given a number represented as a binary representation of bits. You are also given a number and a character .
Determine a number that is generated after cyclically shifting the binary representation of by positions either left if or right is .
Input format
Output format
Print integers in a separate line representing the answer to each query.
Constraints
For first case : N in binary is 0001 1110 1100 1001 and shifting it left by 5 position, it becomes 1101 1001 0010 0011 which in decimal system is 55587
For second case : N in binary is 0001 1110 1100 1001 and shifted 3 position to right it becomes 0010 0011 1101 1001 which in decimal system is 9177