Do you know the formula for the volume of a cylinder? It's Vc = πr2h,
where r is the radius of the can and h is its height.
You also need to know the formula for the volume of a sphere: Vs = 4/3πr3.
Since the balls fit tightly in the can, the radii of the can and balls are the same. The height of the can is three balls times the diameter of each ball (which is twice the radius).
Using these formulas, you can figure out how much volume the can holds, then subtract the volume for three balls.
I hope this helps!