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