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.text.ParseException;
import java.util.*;
import java.io.*;
import java.math.BigInteger;


import static java.lang.Math.*;

    public class solver {
    
 
    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE")!=null;
    
    BufferedReader in;
    static PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");
    
    void init() throws FileNotFoundException{
        if (ONLINE_JUDGE){          
             in = new BufferedReader(new InputStreamReader(System.in));
             out = new PrintWriter(System.out);            
        }else{  
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");           
        }
    }
    
    String readString() throws IOException{
        while(!tok.hasMoreTokens()){
            try{
                tok = new StringTokenizer(in.readLine());
            }catch (Exception e){               
                return null;
            }
        }
        return tok.nextToken();
    }
    
    int readInt() throws IOException{
        return Integer.parseInt(readString());
    }
    
    long readLong() throws IOException{
        return Long.parseLong(readString());
    }
    
    double readDouble() throws IOException{
        return Double.parseDouble(readString());
    }
    
    public static void main(String[] args) throws IOException, ParseException{       
        new solver().run();
    }
    
    long timeBegin, timeEnd;

    void time(){
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }
    int[] iMas(int n) throws IOException{
        int[] a=new int[n];
        for (int i=0;i<n;i++){
            a[i]=readInt();
        }
        return a;
    }
    void oMas(int[] a){
        for (int i=0;i<a.length;i++){
            out.println(a[i]);
        }
    }
    
    int gcd(int a,int b){
        if (b==0) return a;
        return gcd(b, a%b);
    }
    
    
    boolean check(long start,long k,long x,BigInteger w){   
        if (x==0){
            if (w.compareTo(BigInteger.ZERO)>=0) return true;
            return false;
        }
        if (w.compareTo(BigInteger.ZERO)==-1) return false;
        
        
        int i=0;
        while (start>a[i]) i++;
        long result=Math.min(x, a[i]-start+1);
        x-=result;  
        
        
        BigInteger z=BigInteger.valueOf(result);
        z=z.multiply(BigInteger.valueOf(i+1));
        z=z.multiply(BigInteger.valueOf(k));
        w=w.subtract(z);
        
        if (w.compareTo(BigInteger.ZERO)==-1) return false;     
        return check(a[i]+1,k,x,w);     
    }
    long[] a;
    
    void solve() throws IOException{
        
        a=new long[18];
        a[0]=10;
        for (int i=1;i<18;i++){
            a[i]=a[i-1]*10;
            a[i-1]--;           
        }
        
        
        
    
        long w=readLong();
        long m=readLong();
        long k=readLong();
        long left=0;
        long right=(long)1e16;
        long ans=0;
        
        
        while (left<=right){
            long mid=left+(right-left)/2;
            if (check(m,k,mid,BigInteger.valueOf(w))){
                ans=mid;
                left=mid+1;
            }else{
                right=mid-1;
            }
        }
        out.println(ans);
        
        
        
    }
    
    public void run() throws IOException, ParseException{
        
        init(); 
        long h=System.currentTimeMillis();
        solve();        
        //System.err.println(System.currentTimeMillis()-h);
        out.close();
    }
    
    
}