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 = int(input())
l=[]
for x in range(6):
    l.append(a%2)
    a=a//2
a = l[4]*1
a += l[1]*2
a += l[3]*4
a += l[2]*8
a += l[0]*16
a += l[5]*32
print(a)