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:
ls=str(bin(int(input())))
s = [char for char in ls]
s.remove(s[0])
s.remove(s[0])
while len(s)<6:
    s.insert(0,'0')
ans=[]
ans.append(s[0])
ans.append(s[5])
ans.append(s[3])
ans.append(s[2])
ans.append(s[4])
ans.append(s[1])
print(int(''.join(ans),2))