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:
def dectobin(n):
	return bin(n).replace("0b","")

def makeList(s):
	length = len(s)
	l=[]
	for i in range(6-length):
		l.append(0)
	for i in range(length):
		l.append(s[i])
	return l

def fun(l):
	l2=[0,0,0,0,0,0]
	l2[0]=l[0]
	l2[4]=l[4]
	l2[1]=l[5]
	l2[5]=l[1]
	l2[2]=l[3]
	l2[3]=l[2]
	return l2

def listtoDec(l):
	return 32*int(l[0])+16*int(l[1])+8*int(l[2])+4*int(l[3])+2*int(l[4])+1*int(l[5])


n = int(input())
print(listtoDec(fun(makeList(dectobin(n)))))