#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long n, d, ans = 0;
long long a[N];
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> d;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  for (long long i = 2; i <= n; i++) {
    long long diff = (a[i - 1] - a[i] + 1);
    diff = (diff + d - 1) / d;
    diff = max(0LL, diff);
    ans += diff;
    a[i] += diff * d;
  }
  cout << ans;
  return 0;
}
