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=str(bin(int(input()))[2:])
p=["0"]*(len(n) if len(n)>6 else 6)
ind=len(p)-1
for i in range(len(n)-1,-1,-1):
    if(n[i]=="1"):
        p[ind]="1"
    ind-=1
tmp=p[1]
p[1]=p[5]
p[5]=tmp
tmp=p[2]
p[2]=p[3]
p[3]=tmp
p="".join(p)
print(int(p,2))