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 decimalToBinary(n):  
    return bin(n).replace("0b", "")  
    

dec_val = int(input())
numero_binario =decimalToBinary(dec_val) 
cant_agregar = 6-len(numero_binario)

numero_binario = (cant_agregar * '0') + numero_binario


# 2-6
# 3-4
#4-3
# 6-2

num_final = numero_binario[0] + numero_binario[5] + numero_binario[3] + numero_binario[2] + numero_binario[4] + numero_binario[1]

print(int(num_final, base =2 ))

# And after happily lived ever they
# and they lived happily ever after