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.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;

public class Main {
	
	public static boolean debug = false;
	public static Reader in = new Reader();
	public static Writer out = new Writer();
	
	public static void main(String[] args) {
		long w = in.nextLong();
		long m = in.nextLong();
		long k = in.nextLong();
		
		out.println(answer(w, m, k, (long)1e17));
		out.close();
	}
	
	public static long answer(long w, long m, long k, long last) {
		long first = m;
		long ans = 0;
		long max = 0;
		while(first<last) {
			long mid = (last+first)/2;
			ans = valueOfRange(m, mid)*k;
			//out.printfln("m: %d, mid: %d, valueOfRange: %d, %d", m, mid, ans/k, ans);
			if(ans>w || ans<0) {
				last = mid;
			} else if(ans<w) {
				first = mid+1;
				max = Math.max(max, mid-m+1);
			} else if(ans==w) {
				return mid-m+1; 
			}
		}
		ans = valueOfRange(m, first)*k;
		return ans<=w ? Math.max(max, first-m+1) : max;
	}
	
	public static long valueOfRange(long first, long last) {
		long total = 0;
		while(first<=last) {
			long digits = String.valueOf(first).length();
			long next = (long)Math.pow(10, digits);
			if(next>last) {
				total += (last-first+1)*digits;
				if(total<0) return -1;
				return total;
			} else {
				total += (next-first)*digits + digits+1;
			}
			if(total<0) return -1;
			first = next+1;
		}
		return total;
	}
}

class Writer {
	
	private BufferedWriter output;
	
	public Writer() {
		output = new BufferedWriter(new OutputStreamWriter(System.out));
	}
	
	public Writer(String s) {
		try {
			output = new BufferedWriter(new FileWriter(s));
		} catch(Exception ex) { ex.printStackTrace(); System.exit(0);}
	}
	
	public void println() {
		try {
			output.append("\n");
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void print(Object o) {
		try {
			output.append(o.toString());
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
	
	public void println(Object o) {
		try {
			output.append(o.toString()+"\n");
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void printf(String format, Object... args) {
		try {
			output.append(String.format(format, args));
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
	
	public void printfln(String format, Object... args) {
		try {
			output.append(String.format(format, args)+"\n");
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
	
	public void flush() {
		try {
			output.flush();
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
	
	public void close() {
		try {
			output.close();
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
}

class Reader {
	private BufferedReader input;
	private StringTokenizer line = new StringTokenizer("");
	
	public Reader() {
		input = new BufferedReader(new InputStreamReader(System.in));
	}

	public Reader(String s) {
		try {
			input = new BufferedReader(new FileReader(s));
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
	
	public void fill() {
		try {
			if(!line.hasMoreTokens()) line = new StringTokenizer(input.readLine());
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
	
	public double nextDouble() {
		fill();
		return Double.parseDouble(line.nextToken());
	}
	
	public String nextWord() {
		fill();
		return line.nextToken();
	}
	
	public int nextInt() {
		fill();
		return Integer.parseInt(line.nextToken());
	}

	public long nextLong() {
		fill();
		return Long.parseLong(line.nextToken());
	}
	
	public double readDouble() {
		double d = 0;
		try {
			d = Double.parseDouble(input.readLine());
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return d;
	}
	
	public int readInt() {
		int i = 0;
		try {
			i = Integer.parseInt(input.readLine());
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return i;
	}
	
	public int[] readInts(int n) {
		int[] a = new int[n];
		for(int i=0; i<n; i++)
			a[i] = nextInt();
		return a;
	}
	
	public void fillInts(int[] a) {
		for(int i=0; i<a.length; i++)
			a[i] = nextInt();
	}
	
	public long readLong() {
		long l = 0;
		try {
			l = Long.parseLong(input.readLine());
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return l;
	}
	
	public String readLine() {
		String s = "";
		try {
			s = input.readLine();
		} catch(IOException io) {io.printStackTrace(); System.exit(0);}
		return s;
	}
}