#include <bits/stdc++.h>
using namespace std;
int n, d;
int arr[2100];
int makechange(int x, int y) {
  if (arr[x] < arr[y]) return 0;
  int k = (arr[x] + 1) - arr[y];
  int u = k / d;
  if (k % d != 0) u++;
  arr[y] = arr[y] + (u * d);
  return u;
}
int makeOk(int x) {
  int sum = 0;
  for (int i = x; i <= n; i++) {
    sum = sum + makechange(i - 1, i);
  }
  return sum;
}
int cal() {
  int ans = 0;
  for (int i = n; i > 1; i--) {
    if (arr[i] <= arr[i - 1]) {
      ans = ans + makeOk(i);
    }
  }
  return ans;
}
int main() {
  cin >> n >> d;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  cout << cal() << endl;
  return 0;
}
