The shorter leg of a right triangle is 18 meters. The hypotenuse is 6 meters longer than the longer leg. Find the length of the longer leg.