#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K;
  cin >> N >> K;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  int cnt = 1;
  int tmp_cnt = 0;
  for (int i = 1; i < N; i++) {
    if (abs(A.at(i) - A.at(i - 1)) <= K) {
      tmp_cnt++;
    } else {
      cnt += tmp_cnt;
      tmp_cnt = 0;
    }
  }
  cnt += tmp_cnt;
  cout << cnt << endl;
}
