The length of a rectangle is one inch less than three times its width. If the perimeter of the rectangle is 54 inches, find the length.