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