#include <bits/stdc++.h>
using namespace std;
int len(long long n) {
  int ans = 0;
  while (n) {
    ans++;
    n /= 10;
  }
  return ans;
}
int main() {
  long long ans = 0, w, m, k;
  cin >> w >> m >> k;
  for (int sz = len(m);; sz++) {
    long long p1 = 1;
    for (int i = 0; i < sz; i++) p1 *= 10;
    long long h1 = p1 - m;
    long long div = min(h1, (w / (k * sz)));
    w -= (div * k * sz);
    ans += div;
    if (div < h1) break;
    m = p1;
  }
  cout << ans << endl;
  return 0;
}
