#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* const argv[]) {
  int n, d, a, sum = 0, last = 0;
  cin >> n >> d;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a <= last) {
      int x = (last - a) / d + 1;
      last = a + x * d;
      sum += x;
    } else {
      last = a;
    }
  }
  cout << sum << endl;
  return 0;
}
