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:
import copy
a = int(input())
a = bin(a)
a = a[2:]
array = []
n = 6-len(a)
for i in range(n):
	array.append("0")

for i in a:
	array.append(i)

new = copy.copy(array)

#print(new)

new[0] = array[0]
new[1] = array[5]
new[2] = array[3]
new[3] = array[2]
new[4] = array[4]
new[5] = array[1]

s = ""

for i in new:
	s += i

print(int(s,2))