#include <bits/stdc++.h>
long long int seqSum(long long int x) {
  long long int sum = 0;
  long long int pow_of_ten = 1;
  long long int idx = 1;
  while (pow_of_ten * 10 <= x) {
    sum += pow_of_ten * 9 * idx;
    pow_of_ten *= 10;
    idx++;
  }
  sum += (x - pow_of_ten + 1) * idx;
  return sum;
}
long long int sequenceLength(long long int w, long long m) {
  long long int start = m - 1;
  long long int end = 100000000000000000;
  while (start != end) {
    long long int middle = (start + end) / 2 + 1;
    if (seqSum(middle) - seqSum(m - 1) > w) {
      end = middle - 1;
    } else {
      start = middle;
    }
  }
  return (start - m + 1);
}
int main() {
  long long int w, m, k;
  scanf("%lld %lld %lld", &w, &m, &k);
  w = w / k;
  long long int n = sequenceLength(w, m);
  printf("%lld", n);
  return 0;
}
