A painter leans a ladder against a vertical wall. The top of the ladder is 7 meters above the ground. When the bottom of the ladder is moved 1 meter farther away from the wall, the top of the ladder is 5 meters above the ground. What is the length of the ladder? Round to the nearest thousandth.