A rectangular pool that is 40 feet long by 20 feet wide is surrounded by a rectangular fence, as shown below.

The distance from the pool to the fence is x feet, all the way around. The total area enclosed by the fence (including the pool) is 1,500 square feet. What is the value of x?
The value of x is _____ feet.