#include <bits/stdc++.h>
int main() {
  int n, d, a[3000], i;
  while (~scanf("%d%d", &n, &d)) {
    long long acm = 0, e;
    for (i = 0; i < n; i++) scanf("%d", &a[i]);
    for (i = 1; i < n; i++) {
      if (a[i] <= a[i - 1]) {
        e = (a[i - 1] - a[i]) / d + 1;
        acm += e;
        a[i] += d * e;
      }
    }
    printf("%lld\n", acm);
  }
  return 0;
}
