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())
n = bin(n)
y = (str(n))[2:len(n) + 2]
r = ""
t = 6 - len(y)
i = 0
while(i < t):
    r += "0"
    i += 1
r += y
s = r[0] + r[5] + r[3] + r[2] + r[4] + r[1]
print(int(s, 2))