#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1000 * 1000 + 10;
int b[Maxn];
int main() {
  int n, d;
  cin >> n >> d;
  for (int i = 0; i < n; i++) cin >> b[i];
  int cnt = 0;
  for (int i = 1; i < n; i++) {
    if (b[i] <= b[i - 1]) {
      int num = (b[i - 1] - b[i]) / d;
      cnt += num + 1;
      b[i] += (num + 1) * d;
    }
  }
  cout << cnt;
  return 0;
}
