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())
r='{0:06b}'.format(n)
c=list(r)

c[1],c[5]=c[5],c[1]
c[2],c[3]=c[3],c[2]
m=''.join(c)
dec=int(m[0])*pow(2,5)+int(m[1])*pow(2,4)+int(m[2])*pow(2,3)+int(m[3])*pow(2,2)+int(m[4])*pow(2,1)+int(m[5])*pow(2,0)
print(dec)