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:
s = int(input())
A = [s // 32, (s % 32) // 16, (s % 16) // 8, (s % 8) // 4, (s % 4) // 2, s % 2]
B = [A[0], A[5], A[3], A[2], A[4], A[1]]
print(32*B[0]+16*B[1]+8*B[2]+4*B[3]+2*B[4]+B[5])