#include <bits/stdc++.h>
using namespace std;
unsigned long long dig(unsigned long long n) {
  unsigned long long ret = 0;
  while (n != 0) {
    ret++;
    n /= 10;
  }
  return ret;
}
int main() {
  unsigned long long w, m, k;
  cin >> w >> m >> k;
  unsigned long long ans = 0;
  unsigned long long M = m;
  while (true) {
    unsigned long long d = dig(M);
    unsigned long long nex = 1;
    for (int i = 0; i < d; i++) {
      nex *= 10;
    }
    unsigned long long next = nex - M;
    unsigned long long cost = next * k * d;
    if (w < cost)
      break;
    else {
      w -= cost;
      ans += (nex - M);
    }
    M = nex;
  }
  ans += (w / (dig(M) * k));
  cout << ans << endl;
  return 0;
}
