#include <bits/stdc++.h>
using namespace std;
long long w, m, k;
long long temp1(long long x) {
  long long y = 0;
  while (x > 0) {
    x /= 10;
    y++;
  }
  return y;
}
long long temp2(long long x) {
  long long num = 1;
  for (int i = 1; i <= x; i++) num *= 10;
  return num;
}
int main() {
  long long sum;
  while (~scanf("%lld%lld%lld", &w, &m, &k)) {
    long long a = temp1(m);
    long long t = w / k;
    long long t1 = t / a;
    long long t2 = temp2(a);
    long long ans = 0;
    while (t > 0) {
      if (t1 > t2 - m) {
        t -= (t2 - m) * a;
        ans += t2 - m;
        a++;
        t1 = t / a;
        t2 = temp2(a);
        m = temp2(a - 1);
      } else {
        t -= t1 * a;
        ans += t1;
        break;
      }
    }
    printf("%lld\n", ans);
  }
  return 0;
}
