We'll define S(n) for positive integer n as follows: the number of the n's digits in the decimal base. For example, S(893) = 3, S(114514) = 6.

You want to make a consecutive integer sequence starting from number m (m, m + 1, ...). But you need to pay S(n)·k to add the number n to the sequence.

You can spend a cost up to w, and you want to make the sequence as long as possible. Write a program that tells sequence's maximum length.

Input

The first line contains three integers w (1 ≤ w ≤ 1016), m (1 ≤ m ≤ 1016), k (1 ≤ k ≤ 109).

Please, do not write the %lld specifier to read or write 64-bit integers in C++. It is preferred to use the cin, cout streams or the %I64d specifier.

Output

The first line should contain a single integer — the answer to the problem.

Examples

Input

9 1 1


Output

9


Input

77 7 7


Output

7


Input

114 5 14


Output

6


Input

1 1 2


Output

0
#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007, INF = 2000000001;
int dx[] = {0, 1, 0, -1, 1, 1, -1, -1, 0},
    dy[] = {-1, 0, 1, 0, -1, 1, 1, -1, 0};
const double EPS = 1e-9;
long long gcd(long long a, long long b) { return (b != 0) ? gcd(b, a % b) : a; }
long long modpow(long long a, long long x, long long m = mod) {
  int p = 1;
  while (x > 0) {
    if (x & 1 == 1) {
      p = p * a % m;
      --x;
    } else {
      x >>= 1;
      a = a * a % m;
    }
  }
  return p;
}
void z(const string& s, vector<int>& v) {
  int n = s.length();
  for (int i = 1, l = 0, r = 0; i < n; ++i) {
    if (i <= r) v[i] = min(v[i - l], r - i + 1);
    while (i + v[i] < n && s[v[i]] == s[i + v[i]]) ++v[i];
    if (i + v[i] - 1 > r) r = (l = i) + v[i] - 1;
  }
}
void _a() {
  int r1, c1, r2, c2;
  cin >> r1 >> c1 >> r2 >> c2;
  cout << ((r1 == r2 || c1 == c2) ? 1 : 2) << ' ';
  if (abs(c1 - c2) == abs(r1 - r2))
    cout << 1;
  else if ((abs(c1 - c2) + abs(r1 - r2)) % 2 == 1)
    cout << 0;
  else
    cout << 2;
  cout << ' ';
  cout << max(abs(c1 - c2), abs(r1 - r2));
}
void _b() {
  int n;
  cin >> n;
  vector<set<int> > v(n);
  for (int i = 0; i < n; ++i) {
    int m;
    cin >> m;
    while (m--) {
      int t;
      cin >> t;
      v[i].insert(t);
    }
  }
  for (int i = 0; i < n; ++i) {
    vector<set<int> > vv(v);
    for (set<int>::iterator it = v[i].begin(); it != v[i].end(); ++it) {
      for (int j = 0; j < n; ++j) {
        if (i != j) {
          vv[j].erase(*it);
        }
      }
    }
    string ans = "YES";
    for (int j = 0; j < n && ans == "YES"; ++j) {
      if (vv[j].empty()) ans = "NO";
    }
    cout << ans << endl;
  }
}
class P {
 public:
  double n, d;
  P(double dd) : n(dd), d(dd - floor(n)) {}
};
class CP {
 public:
  bool operator()(const P& a, const P& b) const { return a.d < b.d; }
};
void _c() {
  int n, m;
  cin >> n >> m;
  vector<int> c(n);
  map<int, int> mc;
  for (int i = 0; i < n; ++i) {
    cin >> c[i];
    ++mc[c[i]];
  }
  set<pair<int, int> > sc;
  for (map<int, int>::iterator it = mc.begin(); it != mc.end(); ++it) {
    sc.insert(make_pair(it->second, it->first));
  }
  vector<pair<int, int> > v;
  while (sc.size() > 1) {
    set<pair<int, int> >::reverse_iterator rit = sc.rbegin();
    pair<int, int> l = *rit;
    ++rit;
    pair<int, int> r = *rit;
    v.push_back(make_pair(l.second, r.second));
    sc.erase(l);
    sc.erase(r);
    --l.first;
    --r.first;
    if (l.first > 0) sc.insert(l);
    if (r.first > 0) sc.insert(r);
  }
  cout << v.size() * 2 << "\n";
  for (int i = 0; i < v.size(); ++i) {
    cout << v[i].first << ' ' << v[i].second << "\n";
    cout << v[i].second << ' ' << v[i].first << "\n";
  }
  set<pair<int, int> >::iterator it = sc.begin();
  if (it != sc.end())
    for (int i = 0; i < it->first; ++i)
      cout << it->second << ' ' << it->second << "\n";
}
void _d() {
  int n, m;
  cin >> n >> m;
  vector<string> screen(n);
  for (int i = 0; i < n; ++i) cin >> screen[i];
  int l = m, r = -1, u = n, d = -1;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (screen[i][j] == 'w') {
        l = min(l, j);
        r = max(r, j);
        u = min(u, i);
        d = max(d, i);
      }
    }
  }
  if (r - l != d - u) {
    if (r - l < d - u) {
      bool is = false;
      for (int y = u + 1; y < d && !is; ++y) is = (screen[y][l] == 'w');
      if (is) {
        r += d - u - r + l;
        if (r >= m) {
          int t = (1 + r - m);
          r -= t;
          l -= t;
        }
      } else {
        l -= d - u - r + l;
        if (l < 0) {
          int t = -l;
          l += t;
          r += t;
        }
      }
    } else {
      bool is = false;
      for (int x = l + 1; x < r && !is; ++x) is = (screen[u][x] == 'w');
      if (!is) {
        u -= r - l - d + u;
        if (u < 0) {
          int t = -u;
          u += t;
          d += t;
        }
      } else {
        d += r - l - d + u;
        if (d >= n) {
          int t = 1 + d - n;
          d -= t;
          u -= t;
        }
      }
    }
  }
  if (l < 0 || r >= m || u < 0 || d >= n)
    cout << -1;
  else {
    bool ok = true;
    for (int y = u + 1; y < d && ok; ++y)
      for (int x = l + 1; x < r && ok; ++x) ok = (screen[y][x] == '.');
    if (ok) {
      for (int y = 0; y < n; ++y) {
        for (int x = 0; x < m; ++x) {
          if (((x == l || x == r) && u <= y && y <= d) ||
              ((y == u || y == d) && l <= x && x <= r))
            cout << (screen[y][x] == 'w' ? 'w' : '+');
          else
            cout << '.';
        }
        cout << "\n";
      }
    } else
      cout << -1;
  }
}
void _e() {}
long long gcdex(long long a, long long b, long long& x, long long& y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  } else {
    long long x1, y1;
    long long g = gcdex(b % a, a, x1, y1);
    x = y1 - b / a * x1;
    y = x1;
    return g;
  }
}
int main() {
  long long w, m, k;
  cin >> w >> m >> k;
  long long t = 1, s = 1;
  while ((int)log10(double(m)) > (int)log10(double(t))) t *= 10, ++s;
  long long ans = 0;
  for (long long i = t;; i *= 10, ++s) {
    long long c = i * 9;
    if (i == t) {
      c -= m - i;
    }
    if (w / (k * s) > c) {
      ans += c;
      w -= k * c * s;
    } else {
      ans += w / (k * s);
      break;
    }
  }
  cout << ans;
  return 0;
}
