* Shopkeeper: “100 crowns and 80 hellers, please.”
* Customer: “Here you are.” (handing a 200-crown banknote)
* Shopkeeper: “Would you have 80 hellers?” (passing back a 100-crown note)
* Customer: “No, but here you are.” (adding a 1-crown coin)
* Shopkeeper: “Sorry, but have only this.” (showing a little shiny 50-heller coin)
* Customer: “So I need to give you another 30 heller. But I have only 40.”
* Shopkeeper: “That’s ok, here are the remaining 10.”
Have you ever experienced similar situations? Paying a precise amount can sometimes be difficult, if the set of available coins and banknotes (“tenders”) is limited. The situation above was finally solved: The customer paid 200+1 crowns, got 100+0.50 back, paid another 0.20+0.20, and finally got 0.10 back. This means, 7 tenders had to be exchanged. Sometimes, it may be even more complicated. Your task is to write a program that solves situations like this.