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:
S = 'And after happily lived ever they'
N = bin(input()) [2 : ]
while len(N) < 6: N = '0' + N

A = [N[0], N[5], N[3], N[2], N[4], N[1]]
print int(''.join(A), 2)