#include <bits/stdc++.h>
using namespace std;
unsigned long long int countdigs(unsigned long long int no) {
  unsigned long long int count = 0;
  while (no != 0) {
    ++count;
    no /= 10;
  }
  return count;
}
int main() {
  unsigned long long int w, m, k;
  cin >> w >> m >> k;
  w = w / k;
  unsigned long long int count = 0;
  unsigned long long int indigcount = countdigs(m);
  unsigned long long int initten =
      (unsigned long long int)pow(10.0, (double)indigcount);
  unsigned long long int diff = initten - m;
  while (w != 0) {
    if (w / indigcount >= diff) {
      count += diff;
      w -= (diff * indigcount);
      ++indigcount;
      diff = 10 * initten - initten;
      initten = 10 * initten;
    } else {
      count += w / indigcount;
      w = 0;
    }
  }
  cout << count;
  return 0;
}
