The foot of a ladder is placed 18 feet from a wall. If the top of the ladder rests 24 feet up on the wall, find the length of the ladder.