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>
#pragma comment(linker, "/STACK:100000000000,100000000000")
using namespace std;
const double eps = 1E-9;
const double Exp = 2.718281828459045;
const double Pi = 3.1415926535897932;
const int NMAX = 100000 + 10;
const int MMAX = 100000 + 10;
const int INF = 1000000000;
template <typename T>
inline T abs(const T& a) {
  if (a < 0) a = -a;
  return a;
}
template <typename T>
inline T sqr(const T& a) {
  return a * a;
}
long long up(long long x) {
  long long p = 1;
  while (x > 0) {
    p *= 10;
    x /= 10;
  }
  return p;
}
int cnt(long long x) {
  int p = 0;
  while (x > 0) {
    p++;
    x /= 10;
  }
  return p;
}
bool gr(long long a, long long b, long long c) {
  return sqrt(b) * sqrt(c) <= sqrt(a);
}
int main() {
  ios::sync_with_stdio(false);
  long long m, k, w;
  long long c = 0;
  cin >> w >> m >> k;
  while (gr(w, (up(m) - m), cnt(m) * k)) {
    w -= (up(m) - m) * cnt(m) * k;
    c += up(m) - m;
    m = up(m);
  }
  c += w / (k * (cnt(m)));
  cout << c << endl;
  return 0;
}
