XPS peak shapes accounting for the inelastic scattering of photoelectrons