#include <bits/stdc++.h>
using namespace std;
long long w, m, k;
int main() {
  scanf("%I64d%I64d%I64d", &w, &m, &k);
  w /= k;
  if (!w) {
    puts("0");
    return 0;
  }
  long long cnt = 0;
  long long tmp = m;
  while (tmp) {
    cnt++;
    tmp /= 10;
  }
  tmp = 1;
  for (int i = 0; i < cnt; i++) tmp *= 10;
  long long x = m - 1, y = tmp - 1;
  while (w) {
    if (w < cnt) break;
    if (w >= (y - x) * cnt) {
      w -= (y - x) * cnt;
      x = y;
      y = y * 10 + 9;
      cnt++;
    } else {
      x += w / cnt;
      w = 0;
      break;
    }
  }
  cout << x - m + 1 << endl;
}
