#include <bits/stdc++.h>
const long long mod = 1e9 + 7;
using namespace std;
long long qpow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res *= a, res %= mod;
    a *= a;
    a %= mod;
    b >>= 1;
  }
  return res;
}
template <typename T>
string toString(T val) {
  ostringstream oss;
  oss << val;
  return oss.str();
}
template <typename T>
T fromString(const string& s) {
  istringstream iss(s);
  T res;
  iss >> res;
  return res;
}
int main() {
  long long n, d;
  cin >> n >> d;
  vector<long long> v(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
  }
  long long s = 0;
  long long dif;
  for (long long i = 1; i < n; i++) {
    if (v[i] <= v[i - 1]) {
      dif = v[i - 1] - v[i];
      s += (dif) / d + 1;
      v[i] += (dif / d + 1) * d;
    }
  }
  cout << s;
  return 0;
}
