Jim has a triangular shelf system that attaches to his shower head. The total height of the system is 18 inches, and there are three parallel shelves as shown above. What is the maximum height, in inches, of a shampoo bottle that can stand upright on the middle shelf?
