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=input()
x2="{0:b}".format(int(x))
while(len(x2)<6):
    x2="0"+x2
x2=x2[0]+x2[5]+x2[3]+x2[2]+x2[4]+x2[1]
print(int(x2,2))