Can someone explain the answer to this problem? Answer: 6 in.

Carlos wants to ship 24 small packages that are in the shape of a cube. The volume of each cube is 8 cubic inches. To ship them, he selects a box with dimensions 9 in. x 4 in. x (h) in. What should be the minimum height of the box be?