#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<int> tmp(n);
  for (int i = 0; i < n; i++) cin >> tmp[i];
  reverse(tmp.begin(), tmp.end());
  int ans = 1;
  for (int i = 1; i < n; i++) {
    if (tmp[i - 1] - tmp[i] <= m)
      ans++;
    else
      break;
  }
  cout << ans;
  return 0;
}
