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.util.*;
import java.io.*;
public class Main {
    static BufferedReader reader 
		= new BufferedReader(new InputStreamReader(System.in));       
    static StringBuilder out = new StringBuilder();

    public static void main(String[] args){
        long[] inp = nextLongArray();
        long cost, offset, coefficient;
        cost = inp[0]; offset = inp[1]; coefficient = inp[2];
        cost /= coefficient;
        long len = 0;

        while (true){
            long next = 1;
            while (next <= offset)
                next *= 10;
            long numDigits = ("" + offset).length();

            if (numDigits * (next - offset) <= cost){
                // if we can use all numbers with the same number of digits as offset
                len += next - offset;
                cost -= (next - offset) * numDigits;
                offset = next;
            } else {
                // if we can't use all numbers with the same number of digits as offset
                len += cost / numDigits;
                break;
            }
        }
        
        out.append(len);

        

        System.out.println(out);
    }

    // the followings are methods to take care of inputs.
    static int nextInt(){
        return Integer.parseInt(nextLine());
    }
    static long nextLong(){
        return Long.parseLong(nextLine());
    }
    static int[] nextIntArray(){
        String[] inp = nextLine().split("\\s+");
        int[] ary = new int[inp.length]; for (int i = 0; i < ary.length; i++){
            ary[i] = Integer.parseInt(inp[i]);
        }
        return ary;
    }
    static int[] nextIntArrayFrom1(){
        String[] inp = nextLine().split("\\s+");
        int[] ary = new int[inp.length + 1];
        for (int i = 0; i < inp.length; i++){
            ary[i+1] = Integer.parseInt(inp[i]);
        }
        return ary;
    }
    static long[] nextLongArray(){
        String[] inp = nextLine().split("\\s+");
        long[] ary = new long[inp.length];
        for (int i = 0; i < inp.length; i++){
            ary[i] = Long.parseLong(inp[i]);
        }
        return ary;
    }
    static long[] nextLongArrayFrom1(){
        String[] inp = nextLine().split("\\s+");
        long[] ary = new long[inp.length + 1];
        for (int i = 0; i < inp.length; i++){
            ary[i+1] = Long.parseLong(inp[i]);
        }
        return ary;
    }
	static String nextLine(){
		try { 
			return reader.readLine().trim();
		} catch (Exception e){}
		return null;
	}
}

