#include <bits/stdc++.h>
using namespace std;
long long S(long long n) {
  long long ans = 0;
  while (n > 0) {
    n /= 10;
    ans++;
  }
  return ans;
}
long long power(long long x, long long n) {
  if (n == 0) return 1;
  long long ans = power(x, n / 2);
  ans *= ans;
  if (n % 2 == 1) ans *= x;
  return ans;
}
int main() {
  long long w, m, k;
  cin >> w >> m >> k;
  long long ans = 0, digit = S(m);
  while (w >= digit * k) {
    long long p10 = power(10, digit);
    long long t = min(w / (digit * k), p10 - m);
    w -= (t * k * digit);
    digit++;
    m = p10;
    ans += t;
  }
  cout << ans << endl;
}
