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:
x=bin(int(input()))
x=x[2:]
y=['0','0','0','0','0','0']
i=len(x)-1
j=0
while( i>=0):
    y[j]=x[i]
    i=i-1
    j=j+1
w=[]
w.append(y[5])
w.append(y[0])
w.append(y[2])
w.append(y[3])
w.append(y[1])
w.append(y[4])
f=''.join(w)
print(int(f,2))