#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline bool Max(T &x, const T &y) {
  return x < y ? x = y, 1 : 0;
}
template <typename T>
inline bool Min(T &x, const T &y) {
  return x > y ? x = y, 1 : 0;
}
template <typename T>
using V = vector<T>;
template <typename T>
using VV = V<V<T> >;
static const long long MOD = 1e9 + 7;
static const double PI = 3.141592653589793;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  long long d;
  cin >> n >> d;
  long long prevA, a;
  long long ans = 0;
  long long diff, mul;
  cin >> prevA;
  n--;
  while (n--) {
    cin >> a;
    if (a <= prevA) {
      diff = prevA - a;
      mul = diff / d;
      ans += mul;
      a += d * mul;
      if (a <= prevA) {
        ans++;
        a += d;
      }
    }
    prevA = a;
  }
  cout << (ans) << '\n';
  return 0;
}
