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