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())
x = []
for i in range(6):
    x.append(a % 2)
    a //= 2
x = list(reversed(x))
print(x[1] * 1 + x[4] * 2 + x[2] * 4 + x[3] * 8 + x[5] * 16 + x[0] * 32)