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())
temp = n
l = []
val = [32,16,8,4,2,1]
while temp > 0:
	l.append(temp%2)
	temp = temp//2
while len(l) < 6:
	l.append(0)
l.reverse()
temp = l[5]
l[5] = l[1]
l[1] = temp
temp = l[2]
l[2] = l[3]
l[3] = temp
s = 0
for i in range(6):
	s += l[i]*val[i]
print(s)