#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int w, m, k;
  long long int sum = 0, mul = 10, count = 1, ans = 0;
  cin >> w >> m >> k;
  while (sum < w) {
    if (mul - m > 0) {
      if ((mul - m) > (float)(w - sum) / (float)(count * k)) {
        ans = ans + (w - sum) / (k * count);
        break;
      } else {
        sum += (mul - m) * count * k;
        ans += mul - m;
        count++;
        m = mul;
        mul *= 10;
      }
    } else {
      mul *= 10;
      count++;
    }
  }
  cout << ans << endl;
  return 0;
}
