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.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;


public class MakingSequencesisFun
{
    public static int count (long n)
    {
        int c = 1;
        while(n>=10)
        {
            n/=10;
            c++;
        }
        return c;
    }
    public static int count2(long n)
    {
        if (n<10)return 1;
        if (n<100)return 2;
        if (n<1000)return 3;
        if (n<10000)return 4;
        if (n<100000)return 5;
        if (n<1000000)return 6;
        if (n<10000000)return 7;
        if (n<100000000)return 8;
        if (n<1000000000)return 9;
        if (n<10000000000L)return 10;
        if (n<100000000000L)return 11;
        if (n<1000000000000L)return 12;
        if (n<10000000000000L)return 13;
        if (n<100000000000000L)return 14;
        if (n<1000000000000000L)return 15;
        if (n<10000000000000000L)return 16;
        return 17;
    }
    public static void main(String[] args) throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        long w = Long.parseLong(st.nextToken());
        long m = Long.parseLong(st.nextToken());
        int k = Integer.parseInt(st.nextToken());
        long count = 0;
        int c = count2(m);
        long t = (long)Math.pow(10, c);
        long p = m;
        long x = 0;
        
        while(w>=1)
        {
            
            long numbers = t-p;
            long temp = (long)c*k;
            if(w<temp)
            {
                break;
            }
            else
            {
                x=w/temp;
                if(x>numbers)
                    x=numbers;
                w-=x*temp;
            }
            count+=x;
            p=t;
                t*=10;
            c++;
        }
        System.out.println(count);
        
    }   
}