#include <bits/stdc++.h>
using namespace std;
bool Compare(const pair<int, int> &a, const pair<int, int> &b) {
  return a.first < b.first;
}
const int INF = 0x3f3f3f3f;
string tostring(long long int Number) {
  string String;
  ostringstream Convert;
  Convert << Number;
  String = Convert.str();
  return String;
}
long long int toint(string String) {
  stringstream Convert(String);
  long long int Number = 0;
  Convert >> Number;
  return Number;
}
long long int MIN() { return INF; }
long long int MAX() { return -INF; }
template <typename T, typename... Args>
inline T MIN(T a, Args... args) {
  return min(a, (T)MIN(args...));
}
template <typename T, typename... Args>
inline T MAX(T a, Args... args) {
  return max(a, (T)MAX(args...));
}
int main() {
  long long int n, i, j, c;
  while (cin >> n >> c) {
    long long int a[n + 1];
    a[0] = 0;
    for (i = 0; i < n; i++) cin >> a[i];
    int ct = 0;
    a[n] = 0;
    for (i = 0; i < n; i++) {
      if (a[i + 1] - a[i] <= c)
        ct++;
      else
        ct = 0;
    }
    cout << ct << endl;
  }
  return 0;
}
