Square multiply, prof algoritmo