find the electrostatic energy of the system.