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 binaryToDecimal(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)

a=int(input()) 
b=bin(a).replace('0b','')
b=(6-len(b))*'0'+b
ch=list('0'*6)
ch[0]=b[0]
ch[1]=b[5]
ch[2]=b[3]
ch[3]=b[2]
ch[4]=b[4]
ch[5]=b[1]
ch="".join(ch)
binaryToDecimal(int(ch))