#include <bits/stdc++.h>
using namespace std;
int main() {
  long i, n, d, c, a, m, b;
  cin >> n >> d;
  c = 0;
  m = 0;
  for (i = 0; i < n; i++) {
    cin >> b;
    if (b > m)
      m = b;
    else {
      a = (m - b) / d + 1;
      m = b + a * d;
      c += a;
    }
  }
  cout << c;
}
