#include <bits/stdc++.h>
using namespace std;
long long res;
long long cal(long dg) {
  res = 0;
  for (long i = 1; i <= dg; i++) res = res * 10 + 9;
  return res;
}
long long cal1(long dg) {
  res = 1;
  for (long i = 1; i < dg; i++) res = res * 10 + 0;
  return res;
}
int main() {
  long long w, m, k;
  while (cin >> w >> m >> k) {
    long long low, high, p, a, ans = 0, dig = 0, i;
    low = m;
    while (m != 0) {
      dig++;
      m = m / 10;
    }
    for (i = dig;; i++) {
      high = cal(i);
      p = high - low + 1;
      a = w / (i * k);
      if (a == 0) break;
      ans = ans + min(p, a);
      w -= min(p, a) * i * k;
      low = cal1(i + 1);
    }
    cout << ans << endl;
  }
  return 0;
}
