When writing an electron configuration, first write the energy level (the period), then the subshell to be filled and the superscript, which is the number of electrons in that subshell. The total number of electrons is the atomic number, Z. The rules above allow one to write the electron configurations for all the elements in the periodic table.