#include <bits/stdc++.h>
const int MOD = 1e9 + 7;
const int MAX_VAL = 1e6 + 2;
const int INF = 0x3f3f3f3f;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, arr[100002], words = 0;
  long long c;
  cin >> n >> c;
  for (int i = 0; i < n; ++i) cin >> arr[i];
  arr[n] = 0;
  for (int i = 0; i < n; ++i) {
    if (arr[i + 1] - arr[i] <= c)
      words++;
    else
      words = 0;
  }
  cout << words << endl;
  return 0;
}
