#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c;
  scanf("%d%d", &n, &c);
  int ans = 0;
  int last = 0;
  int tmp;
  while (n--) {
    scanf("%d", &tmp);
    if (tmp - last <= c) {
      last = tmp;
      ans++;
    } else {
      last = tmp;
      ans = 1;
    }
  }
  printf("%d\n", ans);
}
