What is the electron configuration of cadmium?

Cadmium has an electron configuration of 1s2 2s2 2p6 3s2 3p6 4s2 3d10 4p6 5s2 4d10, commonly written in the shorthand as [Kr] 5s2 4d10. For students who have not learnt spdf notation, the configuration is normally written as 2, 8, 18, 18, 2. It has two valence electrons.

The ion would have 8 instead of 10 as the last number.