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.*;
import java.math.BigInteger;
import java.util.*;
import java.util.concurrent.ArrayBlockingQueue;


public class B
{
        String line;
        StringTokenizer inputParser;
        BufferedReader is;
        FileInputStream fstream;
        DataInputStream in;
        String FInput="";
        
        void openInput(String file)
        {

                if(file==null)is = new BufferedReader(new InputStreamReader(System.in));//stdin
                else
                {
                        try{
                
                                
                        fstream = new FileInputStream(file);
                        in = new DataInputStream(fstream);
                        is = new BufferedReader(new InputStreamReader(in));
                        }catch(Exception e)
                        {
                                System.err.println(e);
                        }
                }

        }
        
        void readNextLine()
    	{
    		try {
    			line = is.readLine();
    			inputParser = new StringTokenizer(line, " ,\t");
    			//System.err.println("Input: " + line);
    		} catch (IOException e) {
    			System.err.println("Unexpected IO ERROR: " + e);
    		}	
    		catch (NullPointerException e)
    		{
    			line=null;
    			
    		}
    		
    	}
        
        long NextLong()
        {
                String n = inputParser.nextToken();
                
                long val = Long.parseLong(n);
                
                 return val;
        }
        
        int NextInt()
        {
                String n = inputParser.nextToken();
                int val = Integer.parseInt(n);
                
                //System.out.println("I read this number: " + val);
                return val;
        }
        
        String NextString()
        {
                String n = inputParser.nextToken();
                return n;
        }
        
        void closeInput()
        {
                try {
                        is.close();
                } catch (IOException e) {
                        System.err.println("Unexpected IO ERROR: " + e);
                }
                        
        }
        
        
        public static void main(String [] argv)
        {
                //String filePath="circles.in";
                String filePath=null;
                if(argv.length>0)filePath=argv[0];
                new B(filePath);
                
        }
        
        public B(String inputFile)
        {
        	openInput(inputFile);
    		StringBuilder sb = new StringBuilder();
    		readNextLine();
    		long W=NextLong(), m=NextLong(), K=NextLong();
    		
        	
        	long D=0, H=W;
        	long M=H/2;
        	while(D+1<H)
        	{
        		if(poss(m,m+M-1,W,K))D=M;
        		else H=M-1;
        		M=(D+H)/2;
        	}
        	M+=5;
        	while(!poss(m,m+M-1,W,K))M--;
        	sb.append(M);
        	System.out.println(sb);
    		closeInput();		
      
        }
        
        private boolean poss(long from, long to, long w, long k) {
        	long need=0;
			if(get(from)<get(to))
			{
				long miss=getNum(get(from));
				need+=(miss-from)*get(from);
				from=miss;
			}
			while(get(from)<get(to))
			{
				long miss=getNum(get(from));
				need+=(miss-from)*get(from);
				from=miss;
			}
			need+=(to-from+1)*get(from);
			if(BigInteger.valueOf(need).multiply(BigInteger.valueOf(k)).compareTo(BigInteger.valueOf(w))<=0)return true;
			return false;
		}

		private long getNum(int x) {
			String ret="1";
			for(int i=0; i<x; i++)ret+="0";
			return new Long(ret);
		}

		int get(long x)
        {
        	return (""+x).length();
        }
}