#include <bits/stdc++.h>
int Step() {
  int n, d;
  std::cin >> n;
  std::cin >> d;
  if (n < 2 || d < 1) {
    return 0;
  }
  int* seq = new int[n];
  for (int i = 0; i < n; i++) {
    std::cin >> seq[i];
  }
  int step = 0;
  for (int i = 1; i < n; i++) {
    if (seq[i] - seq[i - 1] <= 0) {
      int stem = (seq[i - 1] - seq[i]) / d;
      seq[i] += d * (stem);
      if (seq[i] - seq[i - 1] <= 0) {
        stem += 1;
        seq[i] += d;
      }
      step += stem;
    }
  }
  return step;
}
int main() { std::cout << Step(); }
