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:
# And after happily lived ever they

n = int(input())
d = [0,5,3,2,4,1]

r=0
for dd in d:
    r=r*2 + bool(n&1<<(5-dd))

print (r)