When producing hydrogen iodide, the energy of the reactants is 581 kJ/mol, and the energy of the products is 590 kJ/mol. The equation is shown.

H2 + I2 → 2HI

What is the total energy of the reaction? Is this an endothermic or exothermic reaction?