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