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:
ans = 0
a = int(input())
bina = ""
if (a == 0):
    binary = "000000"
else:
    while (a != 0):
        bina = bina + str(a%2)
        a = a//2
        binary = bina[::-1]
        if (len(binary) == 1):
            binary = "00000" + binary
        if (len(binary) == 2):
            binary = "0000" + binary
        if (len(binary) == 3):
            binary = "000" + binary
        if (len(binary) == 4):
            binary = "00" + binary
        if (len(binary) == 5):
            binary = "0" + binary
binary_new = binary[0] + binary[5] + binary[3] + binary[2] + binary[4] + binary[1]
for i in range (0,6):
    ans = ans + int(binary_new[i])*2**(5-i)
print (ans)