the cooking club made some pies to sell at a basketball game to raise money for the new math books. The cafeteria contributed three pies to sale. Each pie was then cut into five pieces sold. There were a total of 40 pieces to sell. How many pies did the club make?