#include <bits/stdc++.h>
using namespace std;
int a[100004];
int main() {
  int n, m;
  int i;
  while (scanf("%d%d", &n, &m) != EOF) {
    int s = 1;
    for (i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
    }
    for (i = 2; i <= n; i++) {
      if (a[i] - a[i - 1] <= m)
        s++;
      else
        s = 1;
    }
    cout << s << endl;
  }
}
