#include <bits/stdc++.h>
using namespace std;
void func() {
  long long int n, k;
  cin >> n >> k;
  long long int b[n];
  for (long long int i = 0; i < n; ++i) cin >> b[i];
  long long int tot = 0;
  for (long long int i = 1; i < n; ++i) {
    if (b[i - 1] >= b[i]) {
      long long int l = (b[i - 1] - b[i]);
      l = (l / k);
      tot += l + 1;
      b[i] += (l * k) + k;
    }
  }
  cout << tot << '\n';
}
int32_t main() {
  func();
  return 0;
}
