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=int(input())
b=str(bin(a))
b=b[2:]
c="0"*(6-len(b))+b
d=""
d+=c[0]
d+=c[5]
d+=c[3]
d+=c[2]
d+=c[4]
d+=c[1]
ret=0;
for i in range(5,-1,-1):
    ret+=int(d[i])*(2**(5-i))
print(ret)