#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d;
  while (cin >> n >> d) {
    int time = 0, min, max, temp;
    cin >> min;
    for (int i = 2; i <= n; i++) {
      cin >> max;
      if (min > max) {
        temp = (min - max) / d + 1;
        time += temp;
        max += temp * d;
      } else if (min == max)
        time++, max += d;
      min = max;
    }
    cout << time << endl;
  }
  return 0;
}
