#include <bits/stdc++.h>
using namespace std;
long long n, d, a[2005], ans;
int main() {
  cin >> n >> d;
  for (int i = 1; i <= n; i++) {
    cin >> a[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;
}
