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