#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  int cnt = 1;
  int dif = 1;
  for (int i = 0; i < n; i += dif) {
    for (dif = 1; i + dif < n && abs(a[i] - a[i + dif]) > k; dif++)
      ;
    if ((i + dif >= n)) break;
    cnt++;
  }
  cout << cnt << endl;
  return 0;
}
