Simple model for K x-ray and Auger-electron energy shifts in heavy-ion collisions