Electron affinity of nitrogen and exchange energy When studying the effects of electron filling in chemistry, I was studying why energy is needed to add an electron to a nitrogen atom i.e. electron affinity. 

Nitrogen already has an electron structure of $\ce{1s^2 2s^2 2p^3}$ and using my knowledge of exchange energy, the energy released as exchange energy is 

$$\frac{3 \times 2}{2} = 3K $$

But adding an electron means there is 1 electron  $\ce{1s^2 2s^2 2p^4}$ with opposite spin to the rest of the other electrons so the total exchange energy is still

$$\frac{3 \times 2}{2} + \frac{1 \times 0}{2} = 3K $$

so why is it unfavourable i.e. endothermic for nitrogen to became a nitrogen anion $N^-$?
$ \rm N^{-}$ has the outer electron structure of $ \rm 2s^2 2p^4$. This means we have coulombic repulsion in one of the p orbitals which means adding a single electron will be endothermic. This accounts for the decrease in ionization energy between N and O.

When you get to $\rm N^{3-} $ we have 6K units of exchange energy which is enough to offset the coulombic repulsion. 

You see this effect when considering the electron configurations of the transition elements.