#include <bits/stdc++.h>
using namespace std;
long long solve(long long a) {
  long long idx = 1;
  long long ans = 0;
  long long len = 1;
  while (1) {
    if (idx * 10 > a) {
      ans += (a - idx + 1) * len;
      break;
    }
    ans += idx * 9 * len;
    idx *= 10;
    len++;
  }
  return ans;
}
int main() {
  long long w, m, k;
  cin >> w >> m >> k;
  w = w / k;
  long long low = m - 1, high = 20000000000000000LL;
  long long mid;
  while (1) {
    mid = (low + high) / 2 + 1;
    if (solve(mid) - solve(m - 1) > w)
      high = mid - 1;
    else
      low = mid;
    if (low == high) {
      cout << low - m + 1;
      break;
    }
  }
}
