Elastic scattering of electrons by hydrogen and helium atoms