#include <bits/stdc++.h>
using namespace std;
char c[20];
int main() {
  long long w, m, k;
  cin >> w >> m >> k;
  long long st = 0, tmp = m;
  long long ans = 0;
  while (tmp) {
    tmp /= 10;
    st++;
  }
  long long ind = 10;
  bool flag = 1;
  while (flag) {
    while (m >= ind) ind *= 10;
    if ((ind - m) <= w / (st * k)) {
      w -= (ind - m) * st * k;
      ans += ind - m;
    } else {
      ans += w / (st * k);
      flag = 0;
    }
    m = ind;
    st++;
  }
  cout << ans << endl;
  return 0;
}
