#include <bits/stdc++.h>
using namespace std;
const char IN[] = "_.in";
const char OUT[] = "_.out";
int ntest = 0, test;
unsigned long long w, m, k;
unsigned long long lt[20];
int main() {
  cin >> w >> m >> k;
  stringstream ss;
  string s;
  ss << m;
  ss >> s;
  int tg = s.length();
  lt[0] = 1;
  for (int i = (1); i <= (17); i++) lt[i] = lt[i - 1] * 10;
  long long now = m;
  long long cs = tg;
  long long res = 0;
  long long luu;
  for (int i = (tg); i <= (17); i++) {
    if (w < (lt[i] - now) * k * cs) {
      luu = i;
      break;
    }
    w = w - (lt[i] - now) * k * cs;
    res += lt[i] - now;
    cs++;
    now = lt[i];
  }
  if (w > 0) {
    long long nick = w / luu / k;
    res += nick;
  }
  cout << res;
  return 0;
}
