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