How can an atomic mass not be a whole number?
It's an average of all isotopes.
There are different isotopes of every element and the atomic mass is an average mass of all those isotopes.
E.g. Iron has for naturally occurring isotopes with masses: 53.940
Hope this helps :)