The cooking club made some pies to sell during lunch to raise money for a field trip. The cafeteria helped by donating 3 pies to the club. Each pie was then cut into 6 pieces and sold. There were a total of 72 pieces to sell. How many pies did the cooking club bake?