#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int d;
  cin >> d;
  int* a = new int[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int count = 0;
  for (int i = 1; i < n; i++) {
    int add = 0;
    if (a[i] < a[i - 1]) {
      add = ((a[i - 1] - a[i]) / d) + 1;
      count += add;
    } else if (a[i] == a[i - 1]) {
      add = 1;
      count += 1;
    }
    a[i] += add * d;
  }
  cout << count << endl;
  return 0;
}
