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
#include <bits/stdc++.h>
using namespace std;
unsigned long long int log_10(unsigned long long int i);
unsigned long long int fexp(unsigned long long int b, int e);
unsigned long long int bfind(unsigned long long int r,
                             unsigned long long int aux,
                             unsigned long long int w);
int main() {
  unsigned long long int w, m, k, aux, ans = 0;
  unsigned long long int qnt, req, dig;
  cin >> w >> m >> k;
  while (w) {
    dig = log_10(m);
    aux = fexp(10, dig);
    req = aux - m;
    m = aux;
    aux = dig * k;
    qnt = bfind(req, aux, w);
    if (qnt == 0)
      w = 0;
    else {
      w -= qnt * aux;
      ans += qnt;
    }
  }
  cout << ans << endl;
  return 0;
}
unsigned long long int bfind(unsigned long long int r,
                             unsigned long long int aux,
                             unsigned long long int w) {
  unsigned long long int l = 1, mid, ans = 0;
  while (l <= r) {
    mid = (l + r) / 2;
    if (mid * aux <= w) {
      ans = max(ans, mid);
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return ans;
}
unsigned long long int fexp(unsigned long long int b, int e) {
  if (e == 0) return 1;
  unsigned long long int x = fexp(b, e >> 1);
  if (e & 1)
    return x * x * b;
  else
    return x * x;
}
unsigned long long int log_10(unsigned long long int i) {
  unsigned long long int cont = 0;
  do {
    cont++;
    i /= 10;
  } while (i);
  return cont;
}
