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:
def toDes(n):
    a = 0
    for i in range(0, len(n)):
        if n[i] == '1':
            a += 2 ** (len(n) - i - 1)
    return a
a = int(input())
k = bin(a).replace('0b', '')

if len(k) < 6:
    k = '0'*(6-len(k)) +k
ans = k[0] + k[-1] + k[3] + k[2] + k[-2] + k[1]
print(toDes(ans))