Answer
Atoms with 4 or fewer valence electrons tend to lose them; Atoms with 4 or more valence electrons tend to gain them
Procedure
The octet rule refers to the tendency of atoms to prefer to have eight electrons in the valence shell. When atoms have fewer than eight electrons, they react and form more stable compounds. According to the energy needed, it is easier for atoms closer to 8 electrons in the valence shell to gain electrons than to lose them. On the other hand, atoms with fewer electrons in the outermost shell (1,2,3) will prefer to give their electrons. Number four will be half of the required electrons to complete the octet. Therefore, more than 4 electrons will gain, and less than 4 will lose.