An electrician leans an extension ladder against the outside wall of a house so that it reaches an electric box 22 feet up. The ladder makes an angle of 77 degrees with the ground. Find the length of the ladder.