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:
s=''
x=int(input())
x=bin(x)[2:]
for i in range(6-len(x)):
    x='0'+str(x)
x=list(x)
x[1],x[5]=x[5],x[1]
x[2],x[3]=x[3],x[2]
s=s.join(x)
s= int(s,2)#base 2
print(s)