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())
b=str(bin(a))
c=b.split('0b')[1]
d='0'*(6-len(c))+c
ans=int(d[0]+d[5]+d[3]+d[2]+d[4]+d[1],2)
print(ans)