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 the sale. Each pie was then cut into five pieces and sold. There were a total of 40 pieces to sell. How many pies did the club make? Pls give me an expression and show work.