Do the halogens tend to gain or lose electrons in chemical reactions? how many?