There are coins with face value 1, 2, 5, 10, 20, 50, 100 and 200. We had already collected some coins and now we want to set some parameters of this new product in the database. This will cost for us a lot and we want to get rid of as much coins as possible. The task is to tell the number of coins we will give, or 0 if we can not pay the amount.