#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int n, c;
  cin >> n >> c;
  int x, y;
  cin >> x;
  int ans = 1;
  while (--n) {
    cin >> y;
    if (y - x > c)
      ans = 1;
    else
      ans++;
    swap(x, y);
  }
  cout << ans;
  return 0;
}
