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())

ar=bin(n)[2:]
ar=list(ar)
while len(ar)<6:
    ar=[0]+ar
ar2=ar[:]
ar2[1]=ar[5]
ar2[2]=ar[3]
ar2[3]=ar[2]
ar2[5]=ar[1]

ar2=[str(x) for x in ar2]
print(int("".join(ar2),2))