#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, a[2005], ans = 0;
  cin >> n >> d;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 2; i <= n; i++) {
    if (a[i] <= a[i - 1]) {
      ans += (a[i - 1] - a[i]) / d + 1;
      a[i] += ((a[i - 1] - a[i]) / d + 1) * d;
    }
  }
  cout << ans << endl;
  return 0;
}
