Updating calculation of R_max and M_max.