Density is Mass divided by volume. so to get mass by it self you must multiply both side by the volume. and then your end result will be mass.
I always remember the formula because I think of the pyramid. Any how, Mass = Density * Volume Density = Mass/Volume Volume = Mass/Density
Oh, basically just multiply the two