#include <bits/stdc++.h>
long long int c = 0;
int check(long long int a[], long long int n, long long int d) {
  int x = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i + 1] <= a[i]) {
      x = (a[i] - a[i + 1] + d) / d;
      a[i + 1] = a[i + 1] + x * d;
      c = c + x;
    }
  }
  return -1;
}
int main() {
  long long int n, d, l = 0;
  scanf("%lld %lld", &n, &d);
  long long int arr[n];
  for (int i = 0; i < n; i++) scanf("%lld", &arr[i]);
  if (l = check(arr, n, d) != -1) {
    printf("%lld ", c);
    return 0;
  } else {
    printf("%lld", c);
  }
}
