Determining Valence Electrons