How do you find the number of neutrons in an atom given only the atomic number and the mass number?

Atomic number -> Number of protons

Mass number -> Number of protons and neutrons

So. if you substract atomic number from the mass number you get the number of neutrons.