#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, last = 0;
  long long ans = 0;
  scanf("%d %d", &n, &d);
  for (int i = 0; i < n; i++) {
    int k, t = 0;
    scanf("%d", &k);
    if (k <= last) {
      t = (last - k) / d + 1;
      ans += t;
    }
    last = k + d * t;
  }
  printf("%lld\n", ans);
  return 0;
}
