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:
#!/usr/bin/env python3

a = int(input())
s = bin(a)[2:]
s = "0" * (6 - len(s)) + s
t = [1, 6, 4, 3, 5, 2]
b = int("".join(d for _, d in sorted((t[i], c) for i, c in enumerate(s))), 2)
print(b)