Problem: 

Input

The input contains a single integer a (0 ≤ a ≤ 35).

Output

Output a single integer.

Examples

Input

3


Output

8


Input

10


Output

1024

Solution (in PYTHON3):

Solution:
a = int(input())

a0 = a >> 0 & 1
a1 = a >> 1 & 1
a2 = a >> 2 & 1
a3 = a >> 3 & 1
a4 = a >> 4 & 1
a5 = a >> 5 & 1

b = a4 + (a1 << 1) + (a3 << 2) + (a2 << 3) + (a0 << 4) + (a5 << 5)

print(b)