How to determine the valence electrons of manganese