#include <bits/stdc++.h>
using namespace std;
int main() {
  long long w, m, k;
  while (~scanf("%I64d%I64d%I64d", &w, &m, &k)) {
    w /= k;
    long long s = 0;
    int x = 0;
    long long mm = m;
    while (mm) {
      mm /= 10;
      x++;
    }
    long long mmm = 1;
    for (int i = 0; i < x; i++) {
      mmm *= 10;
    }
    while (w > 0) {
      long long mx = x * (mmm - m);
      if (w >= mx) {
        s += (mmm - m);
        w -= mx;
      } else {
        s += (w / x);
        w = 0;
      }
      m = mmm;
      mmm *= 10;
      x++;
    }
    printf("%I64d\n", s);
  }
}
