#include <bits/stdc++.h>
using namespace std;
int main() {
  long long w, m;
  cin >> w >> m;
  int k;
  cin >> k;
  w /= k;
  long long n = m - 1, x = 9;
  k = 1;
  while (n) {
    if (n < x) {
      w += n * k;
      break;
    }
    w += x * k;
    n -= x;
    x *= 10, k++;
  }
  n = 0, x = 9, k = 1;
  while (w) {
    if (w / k < x) {
      n += w / k;
      break;
    }
    w -= x * k;
    n += x;
    x *= 10, k++;
  }
  cout << n - (m - 1) << '\n';
  return 0;
}
