#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 10;
const int inf = 0x3f3f3f3f;
const long long llinf = 0x3f3f3f3f3f3f3f3f;
const long long mod = 1000000007;
long long a[20];
long long pow(long long x) {
  long long tem = 1;
  for (long long i = 1; i <= x; i++) {
    tem *= 10;
  }
  return tem;
}
int main() {
  long long w, m, k;
  scanf("%I64d%I64d%I64d", &w, &m, &k);
  for (long long i = 1; i <= 18; i++) {
    a[i] = pow(i);
  }
  w /= k;
  long long t = 0;
  long long tem = m;
  while (tem) {
    tem /= 10;
    t++;
  }
  long long ans = 0;
  for (long long i = t; i <= 20; i++) {
    if (i == t) {
      long long sum = a[i] - m;
      if (sum * i < w) {
        w -= sum * i;
        ans += sum;
      } else {
        ans += w / i;
        break;
      }
    } else {
      long long sum = a[i] - a[i - 1];
      if (sum * i < w) {
        w -= sum * i;
        ans += sum;
      } else {
        ans += w / (i);
        break;
      }
    }
  }
  printf("%I64d\n", ans);
}
