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;
const long long int mod = 1000000007;
void print() { cout << endl; }
void printarray() { return; }
void scan() { return; }
template <typename T, typename... Args>
void print(T a, Args... arg) {
  cout << a << " ";
  print(arg...);
}
template <typename T, typename... Args>
void scan(T &a, Args &...arg) {
  cin >> a;
  scan(arg...);
}
template <typename T, typename... Args>
void scan(vector<T> &v, Args &...arg) {
  for (auto &i : v) cin >> i;
  scan(arg...);
}
template <typename T, typename... Args>
void printarray(vector<T> &v, Args &...arg) {
  for (auto i : v) cout << i << " ";
  cout << endl;
  printarray(arg...);
}
long long int isPrime(long long int x) {
  if (x == 1) {
    return 0;
  }
  for (long long int i = 2; i <= x / 2; i++) {
    if (x % i == 0) {
      return 0;
    }
  }
  return 1;
}
long long int is_pallendrome(string s, long long int n) {
  long long int i = 0, j = n - 1;
  for (long long int i = 0; i < n / 2; i++, j--) {
    if (s[i] != s[j]) {
      return 0;
    }
  }
  return 1;
}
long long int binaryToDecimal(long long int n) {
  long long int num = n;
  long long int dec_value = 0;
  long long int base = 1;
  long long int temp = num;
  while (temp) {
    long long int last_digit = temp % 10;
    temp = temp / 10;
    dec_value += last_digit * base;
    base = base * 2;
  }
  return dec_value;
}
void decToBinary(long long int n) {
  for (long long int i = 31; i >= 0; i--) {
    long long int k = n >> i;
    if (k & 1)
      cout << "1";
    else
      cout << "0";
  }
}
long long int sum_of_digits(long long int x) {
  long long int sum = 0;
  while (x > 0) {
    sum += x % 10;
    x /= 10;
  }
  return sum;
}
long long int number_of_digits(long long int x) { return floor(log10(x) + 1); }
long long int isvowel(char x) {
  if (x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u') return 1;
  return 0;
}
long long int isconsonant(char x) {
  if (x != 'a' && x != 'e' && x != 'i' && x != 'o' && x != 'u') return 1;
  return 0;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return a * b / gcd(a, b);
}
void solve() {
  long long int n, d, cnt = 0;
  cin >> n >> d;
  vector<long long int> a(n);
  scan(a);
  for (long long int i = 1; i < n; i++) {
    long long int x = (a[i] - a[i - 1]);
    if (x <= 0) {
      long long int r = a[i - 1] - a[i];
      long long int x = r / d + 1;
      a[i] = a[i] + x * d;
      cnt += x;
    }
  }
  cout << cnt << endl;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  solve();
  return 0;
}
