A sequence a0, a1, ..., at - 1 is called increasing if ai - 1 < ai for each i: 0 < i < t.

You are given a sequence b0, b1, ..., bn - 1 and a positive integer d. In each move you may choose one element of the given sequence and add d to it. What is the least number of moves required to make the given sequence increasing?

Input

The first line of the input contains two integer numbers n and d (2 ≤ n ≤ 2000, 1 ≤ d ≤ 106). The second line contains space separated sequence b0, b1, ..., bn - 1 (1 ≤ bi ≤ 106).

Output

Output the minimal number of moves needed to make the sequence increasing.

Examples

Input

4 2
1 3 3 2


Output

3
#include <bits/stdc++.h>
using namespace std;
int ans[305][10005];
long long m, k, s;
static long parsenum(long j, long l) {
  string k = "";
  long cur = 0;
  for (int i = (int)j; i <= l; ++i) {
    cur *= 10;
    cur += k[i] - '0';
  }
  return cur;
}
static long gcd(long a, long b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
static bool pri(int k) {
  if (k == 1) return false;
  for (int i = 2; i * i <= k; i++) {
    if (k % i == 0) return false;
  }
  return true;
}
void print() {
  for (int i = 0; i <= k; i++) {
    for (int j = 0; j <= s; j++) cout << ans[i][j] << " ";
    cout << "\n";
  }
}
long long binpow(long long a, long long n) {
  if (n == 0) return 1;
  if (n % 2 == 1)
    return (binpow(a, n - 1) * a) % (1000000007);
  else {
    long long b = binpow(a, n / 2) % (1000000007);
    return ((b % (1000000007)) * (b % (1000000007))) % (1000000007);
  }
}
int main() {
  int n;
  cin >> n;
  int d;
  cin >> d;
  int prev;
  cin >> prev;
  int ans = 0;
  int next = 0;
  for (int i = 0; i < n - 1; i++) {
    cin >> next;
    if (prev >= next) {
      int tmp = (prev - next) / d + 1;
      ans += tmp;
      next += d * tmp;
    }
    prev = next;
  }
  cout << ans << "\n";
}
