#include <bits/stdc++.h>
using namespace std;
long long arr[] = {0,
                   9,
                   99,
                   999,
                   9999,
                   99999,
                   999999,
                   9999999,
                   99999999,
                   999999999,
                   9999999999,
                   99999999999,
                   999999999999,
                   9999999999999,
                   99999999999999,
                   999999999999999,
                   9999999999999999,
                   99999999999999999};
int main() {
  long long w, m, k;
  scanf("%I64d%I64d%I64d", &w, &m, &k);
  w /= k;
  int start;
  for (int i = 1; i <= 18; i++) {
    if (arr[i] >= m) {
      start = i;
      break;
    }
  }
  long long sum = 0;
  for (int i = start; i <= 18; i++) {
    if (w >= (arr[i] - m + 1) * i) {
      sum += arr[i] - m + 1;
      w -= (arr[i] - m + 1) * i;
      m += (arr[i] - m + 1);
    } else {
      sum += w / i;
      break;
    }
  }
  printf("%I64d\n", sum);
}
