A ladder is resting against a wall. The top of the ladder touches the wall at a height of 18 ft. Find the length of the ladder if the length is 6 ft more than its distance from the wall.