#include <bits/stdc++.h>
int main(int argc, char** argv) {
  using namespace std;
  int n;
  long d;
  cin >> n >> d;
  long* b = new long[n];
  for (int i = 0; i < n; ++i) {
    cin >> b[i];
  }
  int step_count = 0;
  for (int i = 0; i < n - 1; ++i) {
    int temp_step_count = 0;
    if (b[i] > b[i + 1]) {
      temp_step_count = ceil((double)(b[i] - b[i + 1]) / d);
      if ((b[i] - b[i + 1]) % d == 0) {
        ++temp_step_count;
      }
    } else if (b[i] == b[i + 1]) {
      temp_step_count = 1;
    } else {
      continue;
    }
    b[i + 1] += temp_step_count * d;
    step_count += temp_step_count;
  }
  cout << step_count << '\n';
  delete[] b;
  return 0;
}
