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