#include <bits/stdc++.h>
using namespace std;
long long ans, w, k, m, n, i, j, p, s;
int main() {
  scanf(
      "%I64d"
      "%I64d"
      "%I64d"
      "\n",
      &w, &m, &k);
  p = 1;
  s = m;
  while (s) s /= 10, ++j, p *= 10;
  k = w / k;
  if ((p - m) * j > k)
    ans = k / j;
  else {
    ans = p - m;
    k = k - (p - m) * j;
    p = 9 * p;
    j++;
    while (p * j <= k) {
      k = k - p * j;
      ans += p;
      p *= 10;
      j++;
    }
    ans += (k / j);
  }
  printf(
      "%I64d"
      "\n",
      ans);
  return 0;
}
