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())
sp=[]
for i in range(6):
    sp.append(n%2)
    n//=2
sp1=sp[0:]
sp1.reverse()
sp1[1], sp1[5]=sp1[5], sp1[1]
sp1[2], sp1[3]=sp1[3], sp1[2]
count=0
sp1.reverse()
for i in range(6):
    count+=sp1[i]*2**i
print(count)