#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int w, m, k, l = 0, r = 1, ans = 0;
  cin >> w >> m >> k;
  while (m > r) {
    l++, r *= 10;
  }
  w = w / k;
  while (w >= (r - m) * l) {
    w -= (r - m) * l;
    ans += r - m;
    m = r;
    r *= 10;
    l++;
  }
  ans += w / l;
  cout << ans << endl;
  return 0;
}
