#include <bits/stdc++.h>
using namespace std;
int main() {
  long double n, c;
  cin >> n >> c;
  vector<long double> num(n);
  for (auto &x : num) cin >> x;
  int ans = 0;
  for (int i = 0; i < n - 1; i++) {
    if (num[i] >= num[i + 1]) {
      ans = ans + ceil((num[i] - num[i + 1]) / c);
      num[i + 1] = num[i + 1] + ceil((num[i] - num[i + 1]) / c) * c;
      if (num[i] == num[i + 1]) {
        ans++;
        num[i + 1] += c;
      }
    }
  }
  cout << ans << "\n";
  return 0;
}
