#include <bits/stdc++.h>
using namespace std;
long long w, m, k, d;
int cnt;
int main() {
  cin >> w >> m >> k;
  long long tmp = m;
  w /= k;
  d = 1;
  while (tmp) {
    cnt++;
    tmp /= 10;
    d *= 10;
  }
  long long ans = 0;
  for (;;) {
    long long tot = (d - m) * cnt;
    if (w >= tot) {
      w -= tot;
      ans += d - m;
      cnt++;
      m = d;
      d *= 10;
    } else {
      ans += w / cnt;
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
