
At one end of Chorlton high street, Sam runs a fruit shop where you can buy six apples for a pound. At the other end of the high street Hazel runs a shop where the pricing is slightly more unusual. For a price of m pounds, where m is any whole number, Hazel will multiply the number of apples that you have by m. So if you enter Hazel's shop with six apples and pay her three pounds then you can leave her shop with eighteen apples.
You start with fifty pounds and no apples, and are allowed to visit each of the shops as many times as you like and in any order. What is the maximum number of apples that you can buy?