#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, d;
  cin >> n >> d;
  long long int arr[n];
  for (long long int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long int ans = 0, count = 0;
  for (long long int i = 1; i < n; i++) {
    if (arr[i] <= arr[i - 1]) {
      double val = (arr[i - 1] - arr[i] + 1);
      long long int count = ceil(double(val / d));
      arr[i] = arr[i] + (count * d);
      ans = ans + count;
    }
  }
  cout << ans << endl;
  return 0;
}
