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