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