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.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;

public class FlexingOP2_E {

	public static void solve() {
		long w = s.nextLong();
		long m = s.nextLong();
		long k = s.nextLong();
		long[] starts = new long[18];
		starts[1] = 10L;
		for(int i = 2; i < 18; i++) {
			starts[i] = starts[i - 1] * 10L;
		}
		long[] ends = new long[18];
		ends[0] = 9;
		for(int i = 1; i < 18; i++) {
			ends[i] = (ends[i - 1] * 10L + 9L);
		}
//		System.out.println(ends[17]);
		if(Long.toString(m).length() * (long)k > (long)w) {
			out.print(0);
			return;
		}
		out.println(Bs(w, m, k, starts, ends) - m + 1);	
	}
	
	public static boolean check(long w, long start, long k, long end, long[] starts, long[] ends) {
		int s = Long.toString(start).length();
		int e = Long.toString(end).length();
		if(s == e) {
			long diff = end - start + 1;
			diff *= (long)s;
			return (double)diff <= (double)w/(double)k;
		}
		long diff = ends[s - 1] - start + 1;
		diff *= s;
		if(diff > w) return false;
		for(int i = s + 1; i < e; i++) {
			diff += (ends[i - 1] - starts[i - 1] + 1) * i;
			if(diff > w) return false;
		}
		diff += (end - starts[e - 1] + 1) * e;
		
		return (double)diff <= (double)w/(double)k;
	}
	
	public static long Bs(long w, long m, long k, long[] starts, long[] ends) {
		long start = m;
		long end = (long)1e17 + 10;
		long ans = start;
		while(start <= end) {
			long mid = (start + end)/2L;
			if(check(w, m, k, mid, starts, ends)) {
//				System.out.println(mid);
				start = mid + 1;
				ans = mid;
			}else {
				end = mid - 1;
			}
		}
		return ans;
	}

	public static void main(String[] args) {
		new Thread(null, null, "Thread", 1 << 27) {
			public void run() {
				try {
					out = new PrintWriter(new BufferedOutputStream(System.out));
					s = new FastReader(System.in);
					solve();
					out.close();
				} catch (Exception e) {
					e.printStackTrace();
					System.exit(1);
				}
			}
		}.start();
	}

	public static PrintWriter out;
	public static FastReader s;

	public static class FastReader {

		private InputStream stream;
		private byte[] buf = new byte[4096];
		private int curChar, snumChars;

		public FastReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {
			if (snumChars == -1) {
				throw new InputMismatchException();
			}
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException E) {
					throw new InputMismatchException();
				}
			}
			if (snumChars <= 0) {
				return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int number = 0;
			do {
				number *= 10;
				number += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return number * sgn;
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			long sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long number = 0;
			do {
				number *= 10L;
				number += (long) (c - '0');
				c = read();
			} while (!isSpaceChar(c));
			return number * sgn;
		}

		public int[] nextIntArray(int n) {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = this.nextInt();
			}
			return arr;
		}

		public long[] nextLongArray(int n) {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = this.nextLong();
			}
			return arr;
		}

		public String next() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndofLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public boolean isEndofLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}

	
}
