The area of a rectangle R with width 4 ft is equal to the area of a square S , which has a perimeter of 24 ft. the perimeter of the rectangle R, in feet, is __