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:
conv = bin(int(input()))[2:]
while len(conv) < 6:
    conv = "0" + conv
conv = list(conv)
conv[1], conv[5] = conv[5], conv[1]
conv[2], conv[3] = conv[3], conv[2]
print(int("".join(conv), 2))