Adding the Calculat function for MPI