#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(NULL);
  cin.tie(NULL);
  long long int n, t, LT, W;
  W = LT = 0;
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a - LT > t) W = 0;
    W++;
    LT = a;
  }
  cout << W << endl;
  return 0;
}
