#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d;
  cin >> n >> d;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int c = 0;
  for (int i = 1; i < n; i++) {
    if (a[i] <= a[i - 1]) {
      int diff = a[i - 1] - a[i];
      int f = floor(diff / (d + 0.0)) + 1;
      c += f;
      a[i] = a[i] + f * d;
    }
  }
  cout << c;
}
