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:
import sys

n = int(sys.stdin.readline().strip())
a = n // 32
n = n - 32 * a
b = n // 16
n = n - 16 * b
c = n // 8
n = n - 8 * c
d = n // 4
n = n - 4 * d
e = n // 2
n = n - 2 * e
f = n // 1
n = n - 1 * f

print(32 * a + 16 * f + 8 * d + 4 * c + 2 * e + 1 * b)