Time limit per test: 0.25
Memory limit: 262144
Conductor is quite a boring profession, as all you have to do is just to sell tickets to the passengers. So no wonder that once upon a time in a faraway galaxy one conductor decided to diversify this occupation. Now this conductor sells several tickets at a time to each passenger. More precisely, he successively gives tickets to the passenger until the sum of the digits on all the tickets given becomes not less than some integer number k
. Then this process repeats for the next passenger. Initially conductor has a tape of tickets numbered successively from l
, inclusive. This way of tickets distribution is quite good, because passengers are glad to get several tickets when they pay only for one. But there is one disadvantage. Since each passenger gets several tickets, it is possible that conductor won't be able to serve all passengers. Your task is to help conductor in this difficult situation. You should calculate how many passengers is the conductor able to serve.
Input file contains three integer numbers l
(1 ≤ l
, 1 ≤ k
Output should contain exactly one number — the answer to the problem.
40 218 57