#include <bits/stdc++.h>
using namespace std;
unsigned typedef long long ll;
;
;
int mov[8][2] = {{0, -1}, {1, 0},  {-1, 0}, {0, 1},
                 {1, 1},  {1, -1}, {-1, 1}, {-1, -1}};
int knt[8][2] = {{1, 2}, {1, -2}, {-1, 2}, {-1, -2},
                 {2, 1}, {2, -1}, {-2, 1}, {-2, -1}};
ll m, k, w, ans;
int dij(ll x) {
  int res = 0;
  while (x > 0) {
    res++;
    x /= 10;
  }
  return res;
}
int main() {
  ll cost, nxt, cnt, tmp;
  cin >> w >> m >> k;
  ans = 0;
  cnt = dij(m);
  while (true) {
    nxt = 1;
    for (int i = 1; i <= cnt; i++) nxt *= 10;
    if (((nxt - m) * k * cnt) <= w) {
      w -= ((nxt - m) * k * cnt);
      ans += (nxt - m);
      m = nxt;
      cnt++;
    } else {
      ans += (w / (k * cnt));
      break;
    }
  }
  cout << ans << endl;
}
