#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n, d;
  cin >> n >> d;
  long long int ans = 0;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  for (long long int i = 1; i < n; i++) {
    if (a[i] > a[i - 1])
      continue;
    else {
      long long int sum = (a[i - 1] - a[i]) / d + 1;
      a[i] += sum * d;
      ans += sum;
    }
  }
  cout << ans;
  return 0;
}
