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:
# cook your dish here
a = int(input())
A = bin(a)[2:]
x = '0'*(6-len(A))
A = list(x + A)
t = A[-1]
A[-1] = A[1]
A[1] = t
y = A[3]
A[3] = A[2]
A[2] = y
A = '0b' + ''.join(A)
print(int(A,2))