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 bina(binary):  
    binary1 = binary 
    decimal, i, n = 0, 0, 0
    while(binary != 0): 
        dec = binary % 10
        decimal = decimal + dec * pow(2, i) 
        binary = binary//10
        i += 1
#    print(decimal)
    return decimal 
n = int(input())
aa = bin(n)[2:]
ans=''
if len(aa)<6:
    dif=6-len(aa)
    aa=('0'*dif)+aa
#print(aa)
ans+=aa[0]+aa[5]+aa[3]+aa[2]+aa[4]+aa[1]
print(bina(int(ans)))