#include <bits/stdc++.h>
using namespace std;
unsigned long long my_pow(unsigned long long a, unsigned long long e) {
  return !e ? 1 : (e % 2 ? a * my_pow(a, e - 1) : my_pow(a * a, e / 2));
}
int main() {
  unsigned long long w, m, k;
  cin >> w >> m >> k;
  unsigned long long ans = 0;
  unsigned long long sv = m;
  unsigned long long keta = (m == 0 ? 1 : log10(m) + 1);
  while (true) {
    unsigned long long number = my_pow(10LL, keta) - sv;
    if (keta * number * k <= w) {
      w -= keta * number * k;
      ans += number;
    } else {
      ans += w / (keta * k);
      break;
    }
    sv = my_pow(10LL, keta);
    keta++;
  }
  cout << ans << endl;
  return 0;
}
