#include <bits/stdc++.h>
using namespace std;
int main() {
  int s, d, count = 0, num = 0;
  cin >> s >> d;
  int arr[s];
  for (int i = 0; i < s; i++) {
    cin >> arr[i];
  }
  for (int j = 0; j < s - 1; j++) {
    if (arr[j] >= arr[j + 1]) {
      num = ((arr[j] - arr[j + 1]) / d) + 1;
      arr[j + 1] = arr[j + 1] + d * num;
      count = count + num;
    }
  }
  cout << count;
}
