In a closed system, 2 moles of hydrogen gas react with 1 mole of oxygen gas to form water according to the following balanced chemical equation:
2 H2 + O2 → 2 H2O
During the reaction, the system is maintained at constant temperature and pressure. After the completion of the reaction, the volume of hydrogen gas left unreacted is measured to be 0.5 liters at STP (Standard Temperature and Pressure). Calculate the total number of moles of hydrogen gas initially present in the closed system.