Fast Multiplication#5051

Fast Multiplication

1 second
64 megabytes
Very easy

Given two numbers, and , your task is to compute the value of x = (36 \times a + \left\lfloor b / 16 \right\rfloor) \bmod 32 using only bitwise operations, addition, and subtraction.

Input

The input consists of two integers separated by a space, where 0 \leq a, b \leq 10^6.

Output

The output should be a single integer representing the value of x = (36 \times a + \left\lfloor b / 16 \right\rfloor) \bmod 32.

Examples

Example 1

Loading
Loading