A ladder is leaning against a wall. The top of the ladder is 9 feet above the ground. If the bottom of the ladder is moved 3 feet farther from the wall, the ladder will be lying flat on the ground, still touching the wall. How long, in feet, is the ladder?