Excitation of K-shell electrons into ns states by the impact of charged particles