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