If the area of rectangle R with length 4 feet is equal to the area of square S, which has a perimeter of 24 feet , then the perimeter of rectangle R equals -