#include <bits/stdc++.h>
using namespace std;
long long int find(long long int m) {
  long long int ans = 0;
  while (m) {
    ans++;
    m /= 10;
  }
  return ans;
}
long long int get(long long int x) {
  long long int ans = 0;
  for (long long int i = 1; i <= x; i++) ans = ans * 10 + 9;
  return ans;
}
int main() {
  long long int w, m, k, ans = 0;
  cin >> w >> m >> k;
  long long int size = find(m);
  long long int x = get(size);
  while (1) {
    if ((w / (size * k)) < x - m + 1) break;
    {
      w -= ((x - m + 1) * size * k);
      ans += (x - m + 1);
      m = x + 1;
      size++;
      x = get(size);
    }
  }
  ans += (w / (size * k));
  cout << ans << endl;
  return 0;
}
