#include <bits/stdc++.h>
using namespace std;
long long d(long long x) {
  int cnt = 0;
  while (x) {
    cnt++;
    x = x / 10;
  }
  return cnt;
}
long long pow(long long s) {
  long long sum = 1;
  while (s--) {
    sum *= 10;
  }
  return sum;
}
int main() {
  long long w, m, n;
  while (cin >> w >> m >> n) {
    long long cnt = 0;
    w = w / n;
    long long s = d(m);
    while (w > 0) {
      if (w > s * (pow(s) - m)) {
        w -= s * (pow(s) - m);
        cnt += pow(s) - m;
      } else {
        cnt += w / s;
        w = 0;
      }
      m = pow(s);
      s++;
    }
    cout << cnt << endl;
  }
  return 0;
}
