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:
from copy import copy
a = int(input())

aRepr = list(bin(a)[2:].zfill(6))

answer = copy(aRepr)
answer[1] = aRepr[5]
answer[2] = aRepr[3]
answer[3] = aRepr[2]
answer[5] = aRepr[1]

answer = ''.join(answer)
answer = int(answer, base = 2)
print(answer)