#include <bits/stdc++.h>
using namespace std;
int n, x, c = 0, d = 0, s[1000500];
int main() {
  cin >> n >> x;
  for (int i = 0; i < n; i++) cin >> s[i];
  for (int i = 0; i < n; i++) {
    if (s[i] < s[i + 1] && i + 1 < n)
      continue;
    else if (s[i] >= s[i + 1] && i + 1 < n) {
      c = ((s[i] - s[i + 1]) / x) + 1;
      s[i + 1] = s[i + 1] + x * c;
    }
    d += c;
    c = 0;
  }
  cout << d;
  return 0;
}
