#include <bits/stdc++.h>
using namespace std;
int main() {
  long long w, m, k;
  cin >> w >> m >> k;
  long long max_cost = w / k;
  long long t = 1;
  int p = 0;
  long long ans = 0;
  while (max_cost >= 0) {
    while (m >= t) {
      t *= 10;
      p++;
    }
    assert(m < t);
    if ((t - m) * p > max_cost) {
      long long add = max_cost / p;
      if (add == 0) {
        max_cost = -1;
        break;
      }
      ans += add;
      max_cost -= add * p;
      m += add;
    } else {
      long long add = t - m;
      max_cost -= (t - m) * p;
      ans += add;
      m = t;
    }
  }
  cout << ans << endl;
  return 0;
}
