The method of subgroups for considering the resonance structure of cross sections in neutron calculations