#include <bits/stdc++.h>
using namespace std;
long long int w, m, k;
long long int num_dig(long long int n) {
  int digits = 0, i = 0;
  long long int result = 0;
  long long int temp = n, temp2 = 9, temp3 = 1;
  while (temp) {
    digits++;
    temp /= 10;
  }
  for (i = 1; i < digits; i++) {
    result += i * temp2;
    temp2 = temp2 * 10;
    temp3 = temp3 * 10;
  }
  result = result + digits * (n - temp3 + 1);
  return result;
}
bool is_valid(long long int x) {
  if (num_dig(m + x - 1) - num_dig(m - 1) <= w) {
    return true;
  } else
    return false;
}
long long int binary_search(long long int l, long long int r) {
  if (l == r) return l;
  if (l + 1 == r) {
    if (is_valid(r))
      return r;
    else
      return l;
  }
  long long int mid = (l + r) / 2;
  if (is_valid(mid))
    return binary_search(mid, r);
  else
    return binary_search(l, mid);
}
int main() {
  cin >> w >> m >> k;
  w = w / k;
  cout << binary_search(0, w) << endl;
  return 0;
}
