Question: how do you know how many electrons are on the outer shell?
Answer: So fluorine has 7 electrons in the outermost shell. Basically, count the number of electrons in the orbitals with the highest principle quantum number, and that'll give the number of electrons in the outermost shell.