Maruška received a magic pouch from her grandmother, which always doubled the amount of gold coins it contained at midnight. On Monday at noon, Maruška put some gold coins into the empty pouch. On Tuesday and Wednesday, she took out 40 gold coins each day and did not put anything in. On Thursday, she took out 40 gold coins again, and the pouch was empty.

How many gold coins did Maruška put into the pouch on Monday?

How many gold coins should she have put into the empty pouch so that she could repeatedly take out 40 gold coins each day, without putting anything in, and the number of gold coins in the pouch would be the same before each withdrawal?

(M. Volfová)
1. On Thursday, after taking out 40 gold coins, the purse was empty, so there were those 40 gold coins before taking them out.

On Wednesday, after taking out (before the nightly doubling), there were $40: 2=20$ gold coins in the purse, so before taking them out, there were $20+40=60$ gold coins.

On Tuesday, after taking out, there were $60: 2=30$ gold coins in the purse, so before taking them out, there were $30+40=70$ gold coins.

On Monday, Maruška put $70: 2=35$ gold coins into the purse.

2. To have the same number of gold coins in the purse before taking them out every day, the nightly doubling would need to offset the removal of 40 gold coins. This means that these 40 gold coins would have to be exactly half of the number of gold coins before taking them out, so there would need to be 80 gold coins before taking them out. To have 80 gold coins in the purse on Tuesday before taking them out, Maruška would need to put 40 gold coins into the purse on Monday.

Alternative solution. 1. If we denote Maruška's Monday deposit as $z$, then

- on Tuesday, after taking out, there were $2z-40$ gold coins in the purse,
- on Wednesday, after taking out, there were $4z-80-40=4z-120$ gold coins in the purse,
- on Thursday, after taking out, there were $8z-240-40=8z-280$ gold coins in the purse.

On Thursday, after taking out, the purse was empty, meaning $8z=280$, so $z=35$. On Monday, Maruška put 35 gold coins into the purse.

2. To have the same number of gold coins in the purse before taking them out every day, the number of gold coins would need to be the same after taking them out, or before the nightly doubling. By comparing these values, for example, on Monday and Tuesday, we get $z=2z-40$, so $z=40$. On Monday, Maruška should have put 40 gold coins into the purse.

Suggested scoring. 3 points for each part of the problem (2 points for the intermediate steps in the chosen method and 1 point for the result).