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:
n = int(input())
l = [0] * 6
for i in range(6):
	l[i] = n // 2 ** i % 2
l = l[::-1]
t = [0] * 6
t[0] = l[0]
t[1] = l[5]
t[2] = l[3] 
t[3] = l[2]
t[4] = l[4]
t[5] = l[1]
y = 0
t = t[::-1]
pw = 1
for i in range(6):
	y += t[i] * pw
	pw *= 2
print(y)