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:
x = int(input())
lol = [0] * 6
for i in range(5, -1, -1):
	if x - (2**i) >= 0:
		x = x - (2**i)
		lol[i] = 1

lol = lol[::-1]
#print(lol)
		
print(lol[1] * (2**0) + lol[4] * (2**1) + lol[2] * (2**2) + lol[3] * (2**3) + lol[5] * (2**4) + lol[0] * (2**5))