#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c;
  cin >> n >> c;
  int arr[100001];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int cntr = 1;
  int max = 0;
  for (int i = 1; i < n; i++) {
    if (arr[i] - arr[i - 1] <= c)
      cntr++;
    else {
      if (max < cntr) max = cntr;
      cntr = 1;
    }
  }
  cout << cntr;
  return 0;
}
