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.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class B {
    public static void main(String[] args) throws Exception {
        InputStreamReader input = new InputStreamReader(System.in);
        BufferedReader read = new BufferedReader(input);
        
        String[] sss = read.readLine().split(" ");
        long w = Long.parseLong(sss[0]);
        long m = Long.parseLong(sss[1]);
        long k = Long.parseLong(sss[2]);
        
        if (String.valueOf(m).length() * k > w) {
            System.out.println("0");
            return;
        }
        
        long lo = 0;
        long hi = w;
        while (hi - lo > 1) {
            long mid = (lo + hi) / 2;
            
            if (isEnable(m, mid, w, k)) {
                lo = mid;
            } else {
                hi = mid;
            }
        }
        System.out.println(isEnable(m, hi, w, k) ? String.valueOf(hi) : String.valueOf(lo));
    }
    
    private static boolean isEnable(long m, long count, long w, long k) {
        BigInteger cost = new BigInteger(String.valueOf(getCost(String.valueOf(m), String.valueOf(m + count - 1))));
        cost = cost.multiply(new BigInteger(String.valueOf(k)));
        
        int comp = new BigInteger(String.valueOf(w)).compareTo(cost);
        return comp >= 0;
    }
    
    private static String[] maxperdigit = new String[]{"9", "99", "999", "9999", "99999", "999999", "9999999", "99999999", "999999999", "9999999999", "99999999999", "999999999999", "9999999999999", "99999999999999", "999999999999999", "9999999999999999", "99999999999999999"};
    private static long getCost(String min, String max) {
        int dmin = min.length();
        int dmax = max.length();
        if (dmin == dmax) {
            return (Long.parseLong(max) - Long.parseLong(min) + 1) * dmin;
        }
        long cost = (Long.parseLong(maxperdigit[dmin-1]) - Long.parseLong(min) + 1)*dmin;
        for (int i = dmin + 1; i < dmax; ++i) {
            cost += (Long.parseLong(maxperdigit[i-1]) - Long.parseLong(maxperdigit[i-2])) * i;
        }
        cost += (Long.parseLong(max) - Long.parseLong(maxperdigit[dmax-2])) * dmax;
        return cost;
    }
}