An empirical method for estimating the electron affinities of atoms