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:
#123456 000101 011000
#164352 100011 110010
t = int(input())
n = (bin(t)[2:])[::-1]
n += (6-len(n))*"0"
n = n[::-1]
l = list(n)
l[1], l[5] = l[5], l[1]
l[2], l[3] = l[3], l[2]
ans = ""
for i in l:
	ans += i
print (int(ans,2))