Answer:
We want the biggest amount, so here goes:
1. one-euro
2. one-euro
3. two-euro (he can't pick a one-euro here, otherwise he's done!)
4. two-euro
5. five-euro (he can't pick a two-euro here, otherwise he's done!)
6. five-euro
7. five-euro
1+1+2+2+5+5+5 = 21