For the first time , we have used RHESSI ’ s spatial and energy resolution to determine the combined chromospheric and coronal density profile of the flaring solar atmosphere in a statistical manner , using a dataset of 838 flares observable in hard X-rays above 25 keV . Assuming the thick-target beam model , our “ average flaring atmosphere ” was found to have density scale heights of 131 \pm 16 km at low altitudes ( chromosphere , up to \approx 1–1.5 Mm above photosphere ) , and of 5–6 Mm at high altitudes ( corona , above \approx 2–3 Mm ) . Assuming a unit step change in ionization level , modeling yields a height of 1.3 \pm 0.2 Mm for the transition between fully neutral to fully-ionized atmosphere . Furthermore , centroids of emission above 50 keV , produced by electrons of similar or higher energies , are located mostly in a small region \sim 0.5 Mm in vertical extent , where neutral densities are beyond 3 \times 10 ^ { 13 } cm ^ { -3 } .