# How many valence electrons does the azide ion have?

We had a test and and we had a question asking the number of valence electrons in an azide ion, $\ce{N3^{-}}$. I find out that the answer is 16 but I could not understand how. I saw the structure. It says that the end nitrogen have a -1 charge and the middle nitrogen has a +1 charge.

From where does the one of the end nitrogen get the electron assuming the other end nitrogen gets it from the middle nitrogen?

Nitrogen (the element) has 7 electrons. But two of those electrons are in the $1s$ orbital, and so are not considered valence. Therefore, a single elemental nitrogen has five valence electrons.
There are three nitrogens, and so $5 \times 3 = 15$ electrons for $\ce{N_3}$.
Finally, azide is $\ce{N_3^{-}}$, there is an additional electron beyond the neutral form. So, the total number of valence electrons is $15 + 1 = 16$.