The mass number of an element is the number of protons, plus the number of neutrons, measured as an integer tally of the two.
The mass number doesn't really reflect the actual mass of the atom, or even the mass of the protons and neutrons. It's really just like a headcount. This is a little easier to work with in practical terms, especially because the actual masses of the proton and neutron are extremely small and obscure from our macroscopic perspective, and because the two actually have slightly different masses. This doesn't even account for the mass of the electrons or the mass contributions of any additional energy in the system. Thus the "atomic mass number" is not the same thing as the actual mass of the atom.
If it isn't the actual mass, of what use is it? The atomic mass can be used in stoichiometric calculations to convert between atoms, moles and grams of matter, in part because the this is the agreed-upon convention by which the Avogadro constant is related to atomic masses, and because the difference in atomic mass and mass number is relatively small.