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