#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int w, m, k;
  cin >> w >> m >> k;
  long long int n = log10(m) + 1;
  long long int s = 0;
  long long int y = m - pow(10, n - 1);
  while (w > (pow(10, n) - pow(10, n - 1) - y) * k * n) {
    w -= (pow(10, n) - pow(10, n - 1) - y) * k * n;
    s += pow(10, n) - pow(10, n - 1) - y;
    n++;
    y = 0;
  }
  long long int x = w / (k * n);
  s += x;
  cout << s << "\n";
  return 0;
}
