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