#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c;
  cin >> n >> c;
  int prevTime = 0, w = 0;
  for (int i = 0; i < n; i++) {
    int time;
    cin >> time;
    if (time - prevTime > c) {
      w = 0;
      prevTime = time - c;
    }
    if (time - prevTime <= c) {
      w++;
    } else if (time - prevTime > c) {
      w = 1;
    }
    prevTime = time;
  }
  cout << w;
  return 0;
}
