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.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

public class B implements Runnable {
	
	private void solve() throws IOException {
		long w = nextLong();
		long m = nextLong();
		long k = nextLong();
		int len = ("" + m).length();
		long prev = m;
		long res = 0;
		for (long digits = len; ; digits++) {
			long max = 1;
			long S = digits;
			while (S > 0) {
				max *= 10L;
				S--;
			}
			max--;
			boolean found = false;
			long lo = prev, hi = max;
			int iter = 500;
			while (iter-- > 0) {
				long mid = (lo + hi) / 2;
				BigInteger cnt = BigInteger.valueOf(mid - prev + 1);
				cnt = cnt.multiply(BigInteger.valueOf(digits * k));
				if (BigInteger.valueOf(w).compareTo(cnt) >= 0) {
					lo = mid;
					found = true;
				} else {
					hi = mid;
				}
			}
			if (!found) break;
			long cnt = hi - prev + 1;
			long a = cnt * digits * k;
			if (w >= a) {
				w -= a;
				res += cnt;
			} else {
				cnt = lo - prev + 1;
				a = cnt * digits * k;
				if (w >= a) {
					w -= a;
					res += cnt;
				}
			}
			prev = max + 1;
		}
		pl(res);
	}

	public static void main(String[] args) {
		new B().run();
	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter writer;

	public void run() {
		try {
			reader = new BufferedReader(new BufferedReader(new InputStreamReader(System.in)));
//			reader = new BufferedReader(new BufferedReader(new FileReader("A.in")));
			writer = new PrintWriter(System.out);
//			writer = new PrintWriter("A.out");
			tokenizer = null;
			solve();
			reader.close();
			writer.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	BigInteger nextBigInteger() throws IOException {
		return new BigInteger(nextToken());
	}

	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}

	void p(Object... objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	void pl(Object... objects) {
		p(objects);
		writer.println();
	}

	int cc;

	void pf() {
		writer.printf("Case #%d: ", ++cc);
	}

}