#include <bits/stdc++.h>
using namespace std;
long long w, m, k;
long long getans(long long x) {
  long long cmp = 10;
  long long add = 9;
  long long ans = 0;
  long long sum = 0;
  long long cnt = 1;
  while (x >= cmp) {
    sum += add;
    ans += add * cnt;
    cnt++;
    add *= 10;
    cmp *= 10;
  }
  ans += (x - sum) * cnt;
  return ans;
}
inline long long getval(long long x) { return (getans(x) - getans(m - 1)); }
long long binarysearch(long long l, long long r, long long val) {
  if (l == r) {
    while (getval(l) > val) l--;
    return l;
  }
  long long mid = (l + r) >> 1;
  if (getval(mid) < val)
    return binarysearch(mid + 1, r, val);
  else
    return binarysearch(l, mid, val);
}
int main() {
  while (cin >> w >> m >> k) {
    long long t = binarysearch(m, 100000000000000000, w / k);
    if (t < m)
      puts("0");
    else
      cout << t - m + 1 << endl;
  }
  return 0;
}
