#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int x = a[0];
  int c = 0;
  for (int i = 1; i < n; i++) {
    if (x >= a[i]) {
      int y = x - a[i];
      int z = y / k;
      z++;
      c += z;
      x = z * k + a[i];
    } else
      x = a[i];
  }
  cout << c << endl;
  return 0;
}
