A mixture of nitrogen and hydrogen was allowed to come to equilibrium at a given temperature according to 3H2+N2 <=> 2NH3. At equilibrium, the mixture contained 2.1 mol N2, 2.8 mol H2, and 1.7 mol NH3. How many moles of H2 were present at the beginning of the reaction?