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 bitcount(x):
	result = 0
	while x > 0:
		result += x % 2
		x = x // 2

	return result

def tobin(x):
	s = ''
	while x > 0:
		s = str(x % 2) + s
		x = x // 2

	while len(s) < 6:
		s = '0' + s

	return s

def toint(s):
	x = 1
	result = 0
	for c in reversed(s):
		if c == '1':
			result += x

		x *= 2

	return result

x = int(input())
s1 = tobin(x)
s2 = '000000'

# 1 6 4 2 5 3

c0 = s1[0]
c1 = s1[5]
c2 = s1[3]
c3 = s1[2]
c4 = s1[4]
c5 = s1[1]


s2 = c0 + c1 + c2 + c3 + c4 + c5
#print(s2)
print(toint(s2))


# And after happily lived ever they
# And they lived happily ever after

#1 6 4 3 5 2