#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, d;
  long long b[2020];
  long long move = 0;
  cin >> n >> d;
  cin >> b[0];
  for (int i = 1; i < n; i++) {
    long long k;
    cin >> b[i];
    if (b[i] <= b[i - 1]) {
      long long x = b[i - 1] - b[i];
      k = x / d + 1;
      move += k;
      b[i] += k * d;
    }
  }
  cout << move;
}
