Ohm's law for closed circuit

$$E = I\cdot R+I\cdot r$$
Find   It is known that:
      =