#include <bits/stdc++.h>
using namespace std;
int a[2005];
int main() {
  int n, d;
  scanf("%d%d", &n, &d);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int ans = 0;
  for (int i = 2; i <= n; i++) {
    if (a[i] <= a[i - 1]) {
      int num = a[i - 1] - a[i];
      ans += num / d + 1;
      a[i] += num / d * d + d;
    }
  }
  printf("%d\n", ans);
  return 0;
}
