#include <bits/stdc++.h>
int n, s, Ans, a[10005];
int main(void) {
  scanf("%d %d", &n, &s);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n - 1; i++) {
    if (a[i] >= a[i + 1]) {
      Ans += (a[i] - a[i + 1]) / s + 1;
      a[i + 1] += ((a[i] - a[i + 1]) / s + 1) * s;
    }
  }
  printf("%d", Ans);
}
