Specific features of application of the Hartree−Fock method with the orthogonality restrictions proposed earlier (V. N. Glushkov, Chem. Phys. Lett. 287, 189 (1998)) to calculations of energies of highly excited electronic states of the same symmetry are studied. Different schemes are discussed that allow one to avoid the variational collapse in constructing determinant wave functions for excited states. The accuracy of the method is demonstrated for the example of calculation of more than 30 excited states of He and Li atoms.