Gamma-ray radiation with energy 2.223 MeV and the density distribution in the solar atmosphere during flares