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())
ba=bin(a)[2:]
ba=(6-len(ba))*"0"+ba
answer="{}{}{}{}{}{}".format(ba[0],ba[5],ba[3],ba[2],ba[4],ba[1])
print(int(answer,2))