Solve 591 - Box of Bricks.