You gots the #Li_3N# salt, which is a stable salt, even tho in moist air it would hydrolyze to lithium hydroxide and ammonia.
And so we got #3xxLi^+# and #1xxN^(3-)# IN ONE FORMULA UNIT.
Looking at the Periodic Table, and there should be one beside you now, we find that for #Li, Z=3#, and for #N, Z=7#. And #Z# is the atomic number, the number of massive, positively charged particles that are contained in that element's nucleus, and #Z# determines the identity of the element.
So given that #Li^+# has a formal positive charge, it must have ONLY 2 electrons. And since nitrogen has a formal #3-# NEGATIVE CHARGE, it must have 10 electrons. Do you agree? This is something you should spend some time on if you don't see the significance.
And we puts the salt together, we gots #3xx3(Li)# and #7(N)# positive nuclear charges; that's 16 nucular charges, and #3xx2(Li)# and #10(N)# ELECTRONIC CHARGES. Since the electronic charges equal the nuclear charge, the salt is NEUTRAL AS REQUIRED.
AND we could even formulate the formation of the salt as a standard redox reaction.....the metal is OXIDIZED.....
#Li rarr Li^+ + e^-# #(i)#
.....the non-metal is reduced.....
#1/2N_2 +3e^(-) rarr N^(3-)# #(ii)#
And cross-multiply the individual redox couples....#3xx(i) + (ii)# to get.....
#3Li+1/2N_2rarrLi_3N#
This is one of the few reactions that dinitrogen will undergo at room temperature; mind you it's slow. Happy?