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 = str(bin(int(input())))
c = list((8 - len(a)) * '0' + a[2:])
c[1],c[5] = c[5],c[1]
c[2],c[3] = c[3],c[2]
b = c[::-1]
ans = 0
k = 1
for i in b:
    ans += k * int(i)
    k *= 2
print(ans)