Klein–Nishina formula and Monte Carlo method for evaluating the gamma attenuation properties of Zn, Ba, Te and Bi elements