#include <bits/stdc++.h>
using namespace std;
long long w, m, k;
int s(long long n) {
  char buf[200];
  sprintf(buf, "%I64d", n);
  return strlen(buf);
}
long long ans = 0;
int main() {
  scanf("%I64d %I64d %I64d", &w, &m, &k);
  long long sm = s(m);
  long long ws = pow(10, sm);
  w /= k;
  long long t = ws - m;
  if (t * sm <= w) {
    ans += t;
    w -= t * sm;
    long long wsn = ws * 10;
    sm += 1;
    t = wsn - ws;
    while (t * sm <= w) {
      ans += t;
      w -= t * sm;
      ws = wsn;
      wsn = ws * 10;
      sm += 1;
      t = wsn - ws;
    }
    ans += w / (sm);
  } else {
    ans = w / (sm);
  }
  printf("%I64d\n", ans);
  return 0;
}
