#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, ara[2005], dif, div, cnt = 0;
  cin >> n >> d;
  for (int i = 0; i < n; i++) cin >> ara[i];
  for (int i = 0; i < n - 1; i++) {
    if (ara[i] == ara[i + 1]) {
      cnt = cnt + 1;
      ara[i + 1] = ara[i + 1] + d;
    } else if (ara[i] > ara[i + 1]) {
      dif = abs(ara[i] - ara[i + 1]);
      div = (dif / d) + 1;
      cnt = cnt + div;
      div = div * d;
      ara[i + 1] = ara[i + 1] + div;
    }
  }
  cout << cnt << endl;
  return 0;
}
