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())
l = []
l2 = []
for i in range(6):
    l.append(n % 2)
    n //= 2
a = 0
a += l[5] * 32
a += l[0] * 16
a += l[2] * 8
a += l[3] * 4
a += l[1] * 2
a += l[4] * 1
print(a)