#include <bits/stdc++.h>
using namespace std;
int n, m, temp, last, xam;
vector<int> v;
queue<int> q;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &temp);
    v.push_back(temp);
  }
  q.push(v[0]);
  for (int i = 1; i < n; i++) {
    if (v[i] - v[i - 1] > m) {
      while (!q.empty()) {
        q.pop();
      }
    }
    q.push(v[i]);
  }
  xam = (int)q.size();
  printf("%d\n", xam);
}
