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:
A = {0:4, 1:1,2:3,3:2,4:0,5:5}
n = int(input())
ans = [0,0,0,0,0,0]
pw = [1,2,4,8,16,32]
i = 0
anss =0
for x in bin(n)[2:][::-1]:
    if(int(x)==1):
        ans[A[i]] = 1
       # print(i,x,A[i])
        anss+=pw[A[i]]
    i+=1
print (anss)