On the calculation of resonance oscillations of the vibro-impact systems by the averaging technique