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:
arr=[0]*6
barr=[0]*6
n=int(input())
i=5
while(n>0):
	# print(i)
	arr[5-i]=(n&1)
	n=n>>1
	i-=1
# print(str(arr[5])+str(arr[4])+str(arr[3])+str(arr[2])+str(arr[1])+str(arr[0]))
barr[1]+=arr[1]
barr[2]+=arr[3]
barr[3]+=arr[2]
barr[4]+=arr[0]
barr[0]+=arr[4]
barr[5]+=arr[5]
# print(str(arr[5])+str(arr[4])+str(arr[3])+str(arr[2])+str(arr[1])+str(arr[0]))
# print(str(barr[5])+str(barr[4])+str(barr[3])+str(barr[2])+str(barr[1])+str(barr[0]))
# print((2**0)*arr[0]+(2**1)*arr[1]+(2**2)*arr[2]+(2**3)*arr[3]+(2**4)*arr[4]+(2**5)*arr[5])
print((2**0)*barr[0]+(2**1)*barr[1]+(2**2)*barr[2]+(2**3)*barr[3]+(2**4)*barr[4]+(2**5)*barr[5])