#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  int d;
  cin >> d;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int count = 0;
  for (int i = 1; i < n; i++) {
    if (a[i] <= a[i - 1]) {
      int tadd = a[i - 1] - a[i];
      tadd++;
      if (tadd % d == 0) {
        a[i] = a[i] + tadd;
        count = count + tadd / d;
      } else {
        a[i] = a[i] + ((tadd / d) + 1) * d;
        count = count + (tadd / d) + 1;
      }
    }
  }
  cout << count << endl;
}
