#include <bits/stdc++.h>
using namespace std;
long long power(long long a, int b) {
  long long res = 1;
  for (int i = 0; i < b; ++i) {
    res *= a;
  }
  return res;
}
int nbc(long long a) {
  int b = 0;
  while (a > 0) {
    a /= 10;
    b++;
  }
  return b;
}
int main() {
  long long w, m, k, n, r, u, v, z, res = 0;
  cin >> w >> m >> k;
  n = w / k;
  z = nbc(m);
  r = pow(10, z) - m;
  if (n > r * z)
    res += r;
  else {
    res += n / z;
    cout << res << endl;
    return 0;
  }
  int i = z + 1;
  n -= r * z;
  while (n / i > 0) {
    if ((n / i) > pow(10, i)) {
      v = power(10, i) - power(10, i - 1);
    } else {
      v = n / i;
    }
    res += v;
    n -= v * i;
    ++i;
  }
  cout << res << endl;
  return 0;
}
