#include <bits/stdc++.h>
using namespace std;
unsigned long long S(unsigned long long x) {
  unsigned long long res = 0;
  while (x > 0) {
    res++;
    x /= 10;
  }
  return res;
}
int main() {
  unsigned long long w, m, k;
  unsigned long long c[19] = {0};
  c[0] = 1;
  for (int i = 1; i <= 18; i++) c[i] = c[i - 1] * 10LL;
  cin >> w >> m >> k;
  unsigned long long res = 0;
  unsigned long long len = S(m);
  unsigned long long rest = 1;
  rest = c[len];
  rest -= m;
  if (rest * len * k > w) {
    res = w / (len * k);
  } else {
    unsigned long long tmp = rest * len * k;
    res += rest;
    len++;
    for (; tmp + c[len] / 10LL * 9LL * len * k <= w; len++) {
      res += c[len] / 10LL * 9LL;
      tmp += c[len] / 10LL * 9LL * len * k;
    }
    res += (w - tmp) / (len * k);
  }
  cout << res << endl;
}
