Easy, assume it's an ellipsoid, then measure it's length, width (assume the same as it circular) and height. Calc it's volume 4/3 pi R * length * width * height.
Assume that the mug is a cylinder, calc it's volume.
THEN you need to do the clever bit, you need to understand how the smarties can tessellate into the cylinders volume, do the calculus, take max and min numbers, and the answer, as always, will be somewhere in the middle of the two numbers.
Trouble is there are quite a few assumptions here.