#include <bits/stdc++.h>
long long s(long long a) { return (long long)log10((double)a) + 1; }
long long min(long long a, long long b) { return a < b ? a : b; }
int main() {
  long long int w, m, k;
  long long int len, cnt, mi;
  long long int p[20];
  p[0] = 1;
  for (int i = 1; i <= 19; i++) {
    p[i] = p[i - 1] * 10;
  }
  while (scanf("%I64d%I64d%I64d", &w, &m, &k) == 3) {
    w /= k;
    len = s(m);
    cnt = 0;
    while (w) {
      mi = min(p[len] - m, w / len);
      if (!mi) {
        break;
      }
      m = p[len];
      w -= mi * len;
      len++;
      cnt += mi;
    }
    printf("%I64d\n", cnt);
  }
  return 0;
}
