#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, n;
  cin >> n >> c;
  b = 0;
  d = 0;
  while (n > 0) {
    cin >> a;
    if (a - b > c) {
      d = 0;
    }
    d++;
    n--;
    b = a;
  }
  cout << d << endl;
}
