How is the mass number calculated for an element?

How is the mass number calculated for an element?