Ronnie made 5 pies for New Year's Day. Some of his family members are allergic to gluten, so he bought gluten-free flour for all of the pies. For each piecrust, he used 2 cups of flour. Health Mart sold bags with 4 cups of gluten-free flour for $12. How much did Ronnie spend on the gluten-free flour so that he had enough for the crusts?