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:
num = int(input())
pix = [0]*6
for i in range(6):
    pix[-i-1] = (num % 2)
    num = num // 2

ref = [0]*6
ref[0] = pix[0]
ref[5] = pix[1]
ref[3] = pix[2]
ref[1] = pix[3]
ref[4] = pix[4]
ref[2] = pix[5]

ref[0] = pix[0]
ref[5] = pix[1]
ref[3] = pix[2]
ref[2] = pix[3]
ref[4] = pix[4]
ref[1] = pix[5]


num = 0
for i in range(6):
    num = num*2 + ref[i]
print(num)