Each side of a square painting is 4 feet long. A frame shop charges $2.87 per foot for a metalframe. How much would it cost to buy a frame for the painting?