#include <bits/stdc++.h>
int main() {
  int n, k, i, d = 0, x = 0, y;
  scanf("%d", &n);
  scanf("%d", &k);
  int a[n];
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == a[i - 1] && i > 0) {
      a[i] = a[i] + k;
      d++;
    } else if (a[i] < a[i - 1] && i > 0) {
      y = a[i - 1] - a[i];
      x = x + (y / k) + 1;
      a[i] = a[i] + k * ((y / k) + 1);
    }
  }
  printf("%d\n", x + d);
}
