#include <bits/stdc++.h>
using namespace std;
long long int w, m, k;
long long int ans;
int f(long long int x) {
  int res = 0;
  while (x) {
    x /= 10;
    res++;
  }
  return res;
}
int main() {
  cin >> w >> m >> k;
  w /= k;
  long long int nxt = 1, cnt = f(m);
  for (int i = 0; i < cnt; i++) nxt *= 10ll;
  while ((nxt - m) * cnt <= w) {
    w -= (nxt - m) * cnt;
    ans += nxt - m;
    cnt++;
    m = nxt;
    nxt *= 10;
  }
  cout << ans + w / cnt << endl;
}
