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:
# 164352
n = int(input())
arr = [0, 5, 3, 2, 4, 1]
N = n
nb = []
while N > 0:
    nb.append(N % 2)
    N //= 2
for i in range(6 - len(nb)):
    nb.append(0)
nb = nb[::-1]
nnb = [0 for i in range(6)]
for i in range(6):
    nnb[i] = nb[arr[i]]
num = 0
for i in range(len(nnb)):
    num *= 2
    num += nnb[i]
print(num)