#include <bits/stdc++.h>
using namespace std;
int len(long long n) {
  int l = 0;
  if (!n) l++;
  while (n) {
    n /= 10;
    l++;
  }
  return l;
}
int main() {
  long long p, i, j, n, k, w, m, ans, a, ttl;
  while (cin >> w) {
    cin >> m >> k;
    ans = 0;
    n = len(m);
    p = 1;
    for (i = 1; i <= n; i++) p *= 10;
    j = p - m;
    ttl = 0;
    while (ans <= w) {
      i = n * k;
      a = (w - ans) / i;
      if (a >= j) {
        ans += n * k * j;
        if (ans <= w) ttl += (p - m);
        m = p;
        n++;
        p *= 10;
        j = p - m;
      } else {
        ans += n * k * a;
        if (ans <= w) ttl += a;
        break;
      }
    }
    cout << ttl << endl;
  }
  return 0;
}
