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())
b = bin(n).replace("0b", "")

f = "0"*(7-len(b)) + b

mapping = [0,1,6,4,3,5,2]
ans = ["0","0","0","0","0","0","0"]

for i in range(7):
    if f[i] == "1":
        ans[mapping[i]] = "1"
    
# print(ans,sep="")

ok = False
s = "0"
for c in ans:
    if c == "1":
        ok = True
    if ok:
        s += str(c)

s = int(s,2)
print(s)