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

public class CF_219B {

    static long cost(long a, long b, long k){
        long sum = 0L;
        int s = 0;
        for(long top = 1L; top <= b*10L && a<=b; top*=10L){
            if(top<a) {
                s++;
                continue;
            }
            
            if(b<top && b>=a){
                sum+= (b-a+1)*k*s;  
            } else {
                sum+= (top - a)*k*s;
                a = top;
            }               
            s++;
        }
                
        return sum;
    }
    
    public static void main(String[] args) {
        FastScanner sc = new FastScanner(System.in);
        
        long w = sc.nextLong();
        long m = sc.nextLong();
        long k = sc.nextLong();
        
        long add = 1;
        while(cost(m,m+add,k)<w){
            add*=2;
        }
        
        long left = m;
        long right = m+add;
        long best = m;
        long act = (right+left)/2;
        while(right > left && act!=left && act!=right) {
            if(cost(m,act,k) <=w && act > best) {
                best =  act;
                left = act;
                act = (right+left)/2;
            } else {
                right = act;
                act = (right+left)/2;
            }
        }
        
        if(cost(m,right,k) <=w && right >= best) {
            best = right;
        }
        
        if(cost(m,best,k)>w) {
            System.out.println(0);
        } else {
            System.out.println(best-m+1);   
        }       
        
    }
    
    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        public FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
        
        double nextDouble(){
            return Double.parseDouble(next());
        }
    }

}
