We'll define S(n) for positive integer n as follows: the number of the n's digits in the decimal base. For example, S(893) = 3, S(114514) = 6.

You want to make a consecutive integer sequence starting from number m (m, m + 1, ...). But you need to pay S(n)·k to add the number n to the sequence.

You can spend a cost up to w, and you want to make the sequence as long as possible. Write a program that tells sequence's maximum length.

Input

The first line contains three integers w (1 ≤ w ≤ 1016), m (1 ≤ m ≤ 1016), k (1 ≤ k ≤ 109).

Please, do not write the %lld specifier to read or write 64-bit integers in C++. It is preferred to use the cin, cout streams or the %I64d specifier.

Output

The first line should contain a single integer — the answer to the problem.

Examples

Input

9 1 1


Output

9


Input

77 7 7


Output

7


Input

114 5 14


Output

6


Input

1 1 2


Output

0
import java.io.*;
import java.util.*;
import java.math.*;

public class Main {

    /**
     * @param args
     */
    public static BigInteger W,K,M;
    public static BigInteger calc(BigInteger x){
        BigInteger tmp = BigInteger.valueOf(0);
        BigInteger ans = BigInteger.valueOf(0);
        BigInteger tmq = BigInteger.valueOf(1);
        BigInteger t;
        while (tmp.compareTo(x) < 0){
            t = tmp.multiply(BigInteger.valueOf(10));
            t = t.add(BigInteger.valueOf(9));
            if (t.compareTo(x) <= 0){
                ans = ans.add(t.subtract(tmp).multiply(K).multiply(tmq));
            }
            else{
                ans = ans.add(x.subtract(tmp).multiply(K).multiply(tmq));
            }
            tmq = tmq.add(BigInteger.valueOf(1));
            tmp = t;
            //System.out.print(tmq+" "+ans+"\n");
        }
        return ans;
    }
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner cin = new Scanner(new BufferedInputStream(System.in));
        W = cin.nextBigInteger();
        M = cin.nextBigInteger();
        K = cin.nextBigInteger();
        BigInteger x = BigInteger.valueOf(10);
        //System.out.print(calc(x)+"\n");
         W = W.add(calc(M.subtract(BigInteger.valueOf(1))));
        BigInteger l = BigInteger.valueOf(0);
        BigInteger r = BigInteger.valueOf(1);
        while (W.compareTo(calc(r)) > 0)
                r = r.multiply(BigInteger.valueOf(10));
        while (l.compareTo(r) != 0){
            BigInteger mid = l.add(r);
            mid = mid.divide(BigInteger.valueOf(2));
            mid = mid.add(BigInteger.valueOf(1));
            if (W.compareTo(calc(mid)) >= 0)
                l = mid;
            else
                r = mid.subtract(BigInteger.valueOf(1));
        }
        System.out.print(l.subtract(M).add(BigInteger.valueOf(1)));
    }

}
