#include <bits/stdc++.h>
using namespace std;
const int INF = 0x6fffffff;
const int inf = 522133279;
const long long llinf = 1e30;
const double eps = 1e-10;
const int MOD = 20121014;
long long doit(long long m) {
  long long cnt = 0;
  while (m) m /= 10, cnt++;
  return cnt;
}
int main() {
  long long w, m, k;
  cin >> w >> m >> k;
  w /= k;
  long long st = doit(m);
  long long s = (long long)pow(10.0, st);
  long long fin = 0;
  while (w > 0) {
    long long res = s - m;
    if (w < st * res) {
      fin += w / st;
      break;
    } else {
      w -= st * res;
      fin += res;
    }
    st++;
    m = s;
    s *= 10;
  }
  cout << fin << endl;
  return 0;
}
