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.util.*;

public class Making_Sequences_Is_Fun {

	public static void main(String[] args) {
		Scanner s =new Scanner(System.in);
		long w = s.nextLong();
		long m = s.nextLong();
		int k = s.nextInt();
		
		w/=k;

		long countup = 0;
		long cnt = 0;
		
		while(countup + (Long.toString(m)).length() <= w){
			countup += (Long.toString(m)).length();
			m++;
			cnt++;
		}
		
		System.out.println(cnt);
		
	}

	public static long S(long mo) {
		long base = 1;
		long cnt = 0;
		
		for(int i = 0 ; i < 17 ; i++){
			if(mo >= base){
				cnt++;
				base*=10;
			}
			else{
				break;
			}
		}
		return cnt;
	}
}
*/
import java.io.*;
import java.util.*;

public class Making_Sequences_Is_Fun {

	public static void main(String[] args) {
		Scanner s =new Scanner(System.in);
		long w = s.nextLong();
		long mo = s.nextLong();
		int k = s.nextInt();
		
		long m = 1;
		
		w/=k;
		w+=digupto(mo-1);


		while(digupto(m*10) <= w){
			m*=10;
		}
		for(long i = m/10 ; i > 0 ; i /= 10){
			long j = i;
			while(digupto(m + j) <= w){
				m+=j;
			}
		}
		long cnt = digupto(m);
		
		while(cnt + (Long.toString(m+1)).length() <= w){
			m++;
			cnt += (Long.toString(m+1)).length();
		}
		
		if((w) == 0){
			System.out.println("0");
		}

		else{
			System.out.println(m-mo+1); 
		} 
	} 
	
	static long digupto(long n) {

		
        long tens = 1;
        long digin = 1;
        long result = 0;

        while (tens * 10 <= n) {
            result += tens * 9 * digin; //189
            tens *= 10; //100
            digin++; //3
        }
        result += (n - tens + 1) * digin;

        return result;
	}
}
