The total mean potential energy of the gas is therefore ⟨ ⟨ H pot ⟩ ⟩ = 1 2 N ⟨ ⟨ h p o t ⟩ ⟩ , where N is the number of particles in the gas, and the factor 1 ⁄ 2 is needed because summation over all the particles counts each interaction twice. Adding kinetic and potential energies, then applying equipartition, yields the energy equation