Measurement of the residual energy of muons in the Gran Sasso underground laboratories