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 PYTHON):

Solution:
st1 = int(input())
bin2 = format(st1, '06b')
t = str(bin2[0]) + str(bin2[5]) + str(bin2[3]) + str(bin2[2]) + str(bin2[4]) + str(bin2[1])
print(int(t, 2))