#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (!b)
    return a;
  else
    return gcd(b, a % b);
}
int count(long long int n) {
  int c = 0;
  while (n) {
    n /= 10;
    c++;
  }
  return c;
}
int main() {
  long long int w, m, k;
  cin >> w >> m >> k;
  int cur = count(m);
  long long int p = 1;
  long long int tmp = cur;
  while (count(p) <= cur) p *= 10;
  long long int ans = 0;
  while (w) {
    long long int s = p - m;
    long long int add = min(w / (k * cur), s);
    w -= add * k * cur;
    if (add == 0) break;
    ans += add;
    cur++;
    m = p;
    p *= 10;
  }
  cout << ans;
}
