#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, b, prev, ans = 0;
  cin >> n >> d;
  cin >> prev;
  for (int i = 1; i < n; ++i) {
    cin >> b;
    if (b <= prev) {
      int x = (int)ceil((prev - b + 1) / (double)d);
      ans += x;
      b += d * x;
    }
    prev = b;
  }
  cout << ans << endl;
  return 0;
}
