The speed of a railway engine is 42 km/hr when no compartment is attached and the reduction in speed is directly proportional to the square root of the number of compartments attached. If the speed of the train carried by this engine is 24 km/hr with 9 compartments attached, the maximum number of compartments that the engine can pull is?