#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int lcm(long long int a, long long int b) {
  return a * (b / gcd(a, b));
}
int main() {
  int n, d, temp = 0;
  cin >> n >> d;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int i = 1, ans = 0;
  while (i < n) {
    if (arr[i] <= arr[i - 1]) {
      temp = ((arr[i - 1] - arr[i])) / d;
      temp++;
      ans += temp;
      arr[i] += ((temp)*d);
    }
    i++;
    temp = 0;
  }
  cout << ans;
}
