Effects of nonmagnetic disorder on the energy of Yu-Shiba-Rusinov states