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>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
const char SPACE = ' ', ENDL = '\n';
const int BASE = (int)1e9 + 7;
const int MODULO = BASE;
int ri() {
  int v;
  cin >> v;
  return v;
}
long long rll() {
  long long v;
  cin >> v;
  return v;
}
string rs() {
  string s;
  cin >> s;
  return s;
}
vector<int> rvi(int n) {
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  return a;
}
void read_graph(int n, int edges, vector<vector<int> >& graph,
                bool oriented = false) {
  graph.assign(n, vector<int>());
  for (int e = 0; e < edges; ++e) {
    int from = ri() - 1;
    int to = ri() - 1;
    graph[from].push_back(to);
    if (!oriented) graph[to].push_back(from);
  }
}
bool yn(bool result) {
  cout << (result ? "YES" : "NO") << ENDL;
  return result;
}
int get_bit(int mask, int bit) { return (mask >> bit) & 1; }
int init_input() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int local_tests = 1;
  return local_tests;
}
void solve_test() {
  int tests = 1;
  while (tests-- > 0) {
    long long w = rll();
    long long m = rll();
    long long k = rll();
    vector<long long> tp(19, 0);
    tp[0] = 1;
    for (int i = 1; i < tp.size(); ++i) {
      tp[i] = tp[i - 1] * 10;
    }
    long long ans = 0;
    for (int i = 0; i < tp.size() - 1; ++i) {
      if (tp[i] <= m && m < tp[i + 1]) {
        long long need = tp[i + 1] - m;
        int len = (i + 1);
        long long price = k * len;
        long long can = w / price;
        long long used = min(can, need);
        ans += used;
        m += used;
        w -= used * price;
      }
    }
    cout << ans << ENDL;
  }
}
int main() {
  int local_tests = init_input();
  for (int local_test = 0; local_test < local_tests; ++local_test) {
    solve_test();
  }
  return 0;
}
