#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  cin >> n >> t;
  int res = 0;
  int mas = 0;
  int before = -1;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x - before <= t || before == -1) {
      res++;
      before = x;
    } else {
      res = 1;
      before = x;
    }
    mas = max(mas, res);
  }
  cout << res << "\n";
  return 0;
}
