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:
n = int(input())
arr = []
for i in range(6):
    arr.append(0)
arr[0] = n // 32
n = n - 32 * (n // 32)
arr[5] = n // 16
n = n - 16 * (n // 16)
arr[3] = n // 8
n = n - 8 * (n // 8)
arr[2] = n // 4
n = n - 4 * (n // 4)
arr[4] = n // 2
n = n - 2 * (n // 2)
arr[1] = n
ans = 0
for i in range(6):
    ans += (2 ** (5 - i)) * arr[i]
print(ans)