#include <bits/stdc++.h>
using namespace std;
int main() {
  int d, a;
  int n;
  cin >> n >> d;
  vector<unsigned long long> v;
  for (int i = 0; i < (int)n; i++) {
    cin >> a;
    v.push_back(a);
  }
  int ans = 0;
  for (int i = 0; i < (int)v.size() - 1; i++) {
    if (v[i] >= v[i + 1]) {
      int diff = (v[i] - v[i + 1]) + 1;
      int times = (diff / d) + (diff % d != 0);
      ans += times;
      v[i + 1] = v[i + 1] + (times * d);
    }
  }
  cout << ans;
  return 0;
}
