mother ate pies in the morning, she ate one pie, while she gave half of all those left to Little Red Riding Hood who gave it to her grandmother. On the way, Little Red Riding Hood ate 2 pies and gave a third of the rest to the wolf. Little Red Riding Hood brought 8 pies to her grandmother. How many pies did mother bake?