An inductor of inductance (L) and a resistor of resistance (R) are initially connected with the battery in series to steady state and then the battery is removed. The total heat produced in the resistor R, when the current in the circuit decreases from maximum value i0 to 0 is -