#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, tmp;
  int cnt = 0, sub;
  bool flag_a, flag_b;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int j = 0; j < n; j++) {
    tmp = cnt;
    for (int k = j + 1; k < n; k++) {
      if (abs(a[j] - a[k]) >= k) {
        cnt++;
      } else {
        j = j + (cnt - tmp);
        break;
      }
    }
  }
  cout << n - cnt;
  return 0;
}
