#include <bits/stdc++.h>
using namespace std;
int ws(long long x) {
  int ans = 0;
  while (x) ans++, x /= 10;
  return ans;
}
long long mypow(long long x, long long p) {
  long long ans = 1;
  while (p--) ans *= x;
  return ans;
}
int main() {
  long long w, m, k, ans = 0;
  while (cin >> w >> m >> k) {
    ans = 0;
    long long maxs = w / k, begx = ws(m);
    while (maxs > 0) {
      begx = ws(m);
      long long num = mypow(10, begx) - m;
      if (maxs - begx * num >= 0) {
        ans += num;
        maxs -= num * begx;
        m = mypow(10, begx);
      } else {
        ans += maxs / begx;
        maxs = 0;
        m = mypow(10, begx);
      }
    }
    cout << ans << endl;
  }
  return 0;
}
