#include <bits/stdc++.h>
using namespace std;
int a[2010], n, b, ans;
int main() {
  cin >> n >> b;
  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]) / b;
      a[i] = a[i] + ((a[i - 1] - a[i]) / b + 1) * b;
      ans++;
    }
  }
  cout << ans << endl;
  return 0;
}
