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:
n = int(input())
s = bin(n)[2:]
j = str(s)
#print(s)
p = []
check = 6 - len(j)
s1 = ''
while (check):
    s1 += '0'
    check -= 1
#print(j)
s1+=j

#print(j
p.append(s1[0])
p.append(s1[5])
p.append(s1[3])
p.append(s1[2])
p.append(s1[4])
p.append(s1[1])
#print(p)
sum = 0
t = 0
for i in p:
    sum += int(i) * 2 ** (len(p) - 1 - t)
    t += 1
print(sum)