What equation is used to calculate the amount of electrical energy used?