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 Main {

	BufferedReader in;
	PrintWriter out;
	StringTokenizer st = new StringTokenizer("");

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

	int s(long n) {
		int ans = 0;
		while (n != 0) {
			ans++;
			n /= 10;
		}
		return ans;
	}

	long cost(long l, long r) {
		if (s(l) == s(r))
			return s(l) * (r - l + 1);
		else {
			long sl = s(l);
			long sr = s(r);
			long ll = 1;
			for (int i = 0; i < sl; i++)
				ll *= 10;
			long ans = sl * (ll - l);
			l = ll;
			sl++;
			while (sl < sr) {
				ans += 9 * ll * sl;
				ll *= 10;
				sl++;
			}
			ans += sl * (r - ll + 1);
			return ans;
		}
	}

	void run() throws IOException {
//		in = new BufferedReader(new FileReader("input.txt"));
//		out = new PrintWriter("output.txt");
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);

		long w = nextLong();
		long m = nextLong();
		long k = nextLong();
		// long last;
		w /= k;
//		System.err.println(cost());
		if (s(m) <= w) {
			long l = m;
			long r = Long.MAX_VALUE / 10;
			while (l + 1 < r) {
				long mid = (l + r) / 2;
				if (cost(m, mid) <= w)
					l = mid;
				else
					r = mid;
//				System.err.println(l + " " + r);
			}
			out.println(l - m + 1);
		} else
			out.println("0");

		in.close();
		out.close();
	}

	String nextToken() throws IOException {
		while (!st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}

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

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

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

	String nextLine() throws IOException {
		st = new StringTokenizer("");
		return in.readLine();
	}

}
