Two of these pairs of nonbonding electrons are associated with the oxygen atom, which has six valence electrons. Four of these electrons are used to form covalent bonds with the two hydrogen atoms, leaving two nonbonding electrons. The other two pairs of nonbonding electrons are associated with the two hydrogen atoms, each of which has one valence electron. This electron forms a covalent bond with the oxygen atom, leaving one nonbonding electron.