#include <bits/stdc++.h>
using namespace std;
int s(long long n) {
  int cnt = 0;
  while (n > 0) {
    n /= 10;
    cnt++;
  }
  return cnt;
}
int main() {
  long long w, m, k;
  cin >> w >> m >> k;
  w /= k;
  int len = s(m);
  unsigned long long ret = 0;
  long long up = pow(10, len);
  while (w >= len) {
    if (w <= (up - m) * len) {
      ret += w / (len);
      break;
    } else {
      ret += (up - m);
      w -= (up - m) * len;
      m = up;
      up *= 10;
      len++;
    }
  }
  cout << ret << endl;
  return 0;
}
