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:
a = int(input())
bin = "{0:b}".format(a);
zero = ''
for i in range(6-len(bin)):
    zero +="0"

bin = zero+bin
b = []
for i in range(6):
    b.append(bin[i])

for i in range(3):
    if i == 1:
        b[i] , b[5] = b[5], b[i]
    if i == 2:
        b[i], b[3] = b[3], b[i]

res = ''
for i in range(6):
    res+=b[i]
print(int(res, 2))