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.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.util.StringTokenizer;


public class T373B {

	public void solve(BigInteger w, BigInteger m, BigInteger k) {
		BigInteger ans = new BigInteger("0");
		
		BigInteger x = new BigInteger("1");
		for (int i = 1; i <= 17; i ++) {
			x = x.multiply(new BigInteger("10"));
			
			if (m.compareTo(x) < 0) break;
		}
			
		while (w.compareTo(new BigInteger("0")) >= 0) {
			BigInteger y = k.multiply(new BigInteger(x.subtract(new BigInteger("1")).toString().length() + ""));
			if (y.multiply(x.subtract(m)).compareTo(w) <= 0) {
				w = w.subtract(y.multiply(x.subtract(m)));
				ans = ans.add(x.subtract(m));
				m = new BigInteger(x.toString());
				x = x.multiply(new BigInteger("10"));
			} else {
				ans = ans.add(w.divide(y));
				w = new BigInteger("-1");
			}
		}
		
		System.out.println(ans);
	}
	
	public static void main(String[] args) {
		FastScanner in = new FastScanner();
		new T373B().solve(new BigInteger(in.nextToken()), new BigInteger(in.nextToken()), new BigInteger(in.nextToken()));
	}
	static class FastScanner {

		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String s) {
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String nextToken() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

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

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

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

	}

}
