#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long N = 1e5 + 7;
vector<pair<long long, long long>> vx;
int32_t main() {
  long long w, n, k;
  cin >> w >> n >> k;
  long long start = 9;
  long long dig = 1;
  while (n > start) {
    start = start * 10 + 9;
    dig++;
  }
  vx.push_back({start - n + 1, dig});
  start++;
  while (start <= (1e17)) {
    dig++;
    vx.push_back({start * 9, dig});
    start *= 10;
  }
  long long ans = 0;
  for (auto i : vx) {
    long long num = min(i.first, w / (k * i.second));
    ans += num;
    w -= num * i.second * k;
    if (w <= 0) break;
  }
  cout << ans;
  return 0;
}
