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:
x=int(input())
list=[]
while(x>0):
    if(x%2==1):
        list.append(1)
    else:
        list.append(0)
    x=x//2;
    
while len(list)<6:
    list.append(0)
ans=0
list[-2],list[-6]=list[-6],list[-2]
list[-3],list[-4]=list[-4],list[-3]

power=1
for bit in list:
    ans=ans+(power*bit)
    power=power*2
print(ans)