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 int MX = 2e6 + 10;
const int mod = 1e9 + 7;
const unsigned long long int inf = 1LL << 62;
int dx4[] = {0, 0, -1, 1};
int dy4[] = {1, -1, 0, 0};
int dx[] = {1, 1, 1, 0, 0, -1, -1, -1};
int dy[] = {1, 0, -1, 1, -1, 1, 0, -1};
vector<string> vec;
string str;
unsigned long long int pw[26];
unsigned long long int ans[26];
void pre() {
  unsigned long long int tot = 0, sum = 0;
  for (int i = 1; i <= 18; i++) {
    pw[i] = powl(10LL, i) - 1;
  }
  for (int i = 1; i <= 18; i++) {
    unsigned long long int tmp;
    tmp = (pw[i] - pw[i - 1]) * i;
    tot += tmp;
    ans[i] = tot;
  }
}
bool solve(unsigned long long int mid, unsigned long long int w,
           unsigned long long int m, unsigned long long int k) {
  unsigned long long int l = log10(m) + 1;
  unsigned long long int r = log10(mid) + 1;
  unsigned long long int sum = ans[r] - ans[l - 1];
  unsigned long long int tmp = (pw[r] - mid) * r;
  sum -= tmp;
  sum -= ((m - 1) - pw[l - 1]) * l;
  return sum * k <= w;
}
int main() {
  pre();
  unsigned long long int w, m, k, mx = 0;
  scanf("%lld %lld %lld", &w, &m, &k);
  unsigned long long int l = m, r = 1e18;
  while (l <= r) {
    unsigned long long int mid = (l + r) / 2;
    if (solve(mid, w, m, k)) {
      mx = max(mx, mid - m + 1);
      l = mid + 1;
    } else
      r = mid - 1;
  }
  printf("%lld\n", mx);
  return 0;
}
