The mass number of a nucleus is
The mass number of the nucleus is always equal to the sum of protons and neutrons present in the nucleus, which is atomic mass of the nucleus.
The mass of the electron is almost negligible. So, the mass does not get affected by changing the number of electron