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.*;
public class TaskA {
       public static void main(String[] args) throws IOException{
    	      FastIn  in = new FastIn(System.in);
    	      long w = in.readLong();
    	      long m = in.readLong();
    	      long k = in.readLong();
    	      long ans = 1L;
    	      if(w <k);
    	      else{
    	    	     long temp = m;
    	    	     int numdigit=0;
    	    	     while(temp!=0){temp/=10;numdigit++;}
    	    	     for(int j=numdigit;true;j++){
    	    	    	 long power = (long) Math.pow(10,j);
    	    	    	 long total = power-m;
    	    	    	 long ctr = w/(j*k);
    	    	    	 if(ctr >= total){ctr = total;}
    	    	    	 w -= (ctr*j*k);
    	    	    	 ans += (ctr);
    	    	    	 m  +=ctr;
    	    	    	 //System.out.println(w);
    	    	        if(w < k || w < (j+1)*k){break;}
    	    	     }
    	      }
    	      System.out.println(--ans);
       }
}

class FastIn{
	private byte[] buffer;
	private InputStream stream;
	private int readChar;
	private int curChar;
	FastIn(InputStream in){
		this.stream = in;
		buffer = new byte[1024];
		readChar=0;
		curChar = -1;
	}
	private int read() throws IOException{
		if(curChar == -1 || curChar == 1024){
			 readChar = stream.read(buffer);
			 if(readChar == -1){return -1;}
			 curChar = 0;
		}
		return (int) buffer[curChar++];
	} 
	public long readLong() throws IOException{
	       char c= (char) read();
	       while(isSpace(c)) c = (char) read();
	       int sign;long value=0L;
	       if(c=='-'){sign = -1;c='0';}
	       else{sign = 1;}
	       do{
	    	   value *= 10;
	    	   value += c-'0';
	       }while(!isSpace(c = (char) read()));
	       return sign*value;
	}
	public String readString() throws IOException{
		char c = (char) read();
		while(isSpace(c))c = (char) read();
		StringBuilder sb = new StringBuilder();
		do{
			sb.append(c);
		}while(!isSpace(c = (char) read()));
		return sb.toString();
	}
	public boolean isSpace(char c){
		int x = (int) c;
		return ((x==32||x== 10 )||(x== 9 ||x==13));
	}
	public void close() throws IOException{
		stream.close();
	}
}