#include <bits/stdc++.h>
using namespace std;
int S(long long int n) {
  int cnt = 0;
  while (n != 0) {
    cnt++;
    n /= 10;
  }
  return cnt;
}
long long int p10(int n) {
  long long int ans = 1;
  while (n--) ans *= 10;
  return ans;
}
int main() {
  long long int w, m, k;
  cin >> w >> m >> k;
  w /= k;
  long long int cnt = 0;
  while ((p10(S(m)) - m) * S(m) <= w) {
    cnt += p10(S(m)) - m;
    w -= (p10(S(m)) - m) * S(m);
    m = p10(S(m));
  }
  cnt += w / S(m);
  cout << cnt << endl;
}
