#include <bits/stdc++.h>
using namespace std;
const int MAXINT = 1 << 31 - 1;
const long long MAXLONG = (long long)1 << 63 - 1;
long long w, k;
long long len, num;
char m[20];
int main() {
  while (cin >> w >> m >> k) {
    len = strlen(m);
    num = w / k;
    long long rem = num;
    long long res = 0;
    long long s;
    sscanf(m, "%I64d", &s);
    long long t = pow(10.0, 1.0 * len);
    while (rem >= len) {
      if (rem >= (t - s) * len) {
        rem -= (t - s) * len;
        res += t - s;
      } else {
        long long once = rem / len;
        res += once;
        rem = 0;
      }
      len++;
      s = t;
      t *= 10;
    }
    cout << res << endl;
  }
  return 0;
}
