#include <bits/stdc++.h>
using namespace std;
long long int func(long long int n) {
  long long int res = 0;
  while (n != 0) {
    n /= 10;
    res++;
  }
  return res;
}
int main() {
  long long int w, m, k;
  cin >> w >> m >> k;
  long long int n = func(m), tr = w / k, res = 0;
  while (tr > 0) {
    long long int dum = pow(10, n) - m;
    res += fmin(tr / n, dum);
    tr -= dum * n;
    m += dum;
    n++;
  }
  cout << res;
}
