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:
n=int(input())
desired=0
for i in range (0,6):
    r = n%2
    #print("r",r)
    #print("n",n)
    n = n//2
    if i==5: desired+=2**5*r
    elif i==4: desired+=r
    elif i==3: desired+=2**2*r
    elif i==2: desired+=2**3*r
    elif i==1: desired+=2**1*r
    elif i==0: desired+=2**4*r
print(desired)