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:
def swap(A,i,j):
    t=A[i]
    A[i]=A[j]
    A[j]=t
N = int(input())
A = [0 for i in range(6)]

for i in range(6):
    A[i] = N%2
    N//=2
A=A[::-1]

swap(A,1,5)
swap(A,2,3)
A=A[::-1]
ans = 0
for i in range(6):
    ans+=((2**i)*A[i])
print(ans)