#include <bits/stdc++.h>
int main() {
  int n, i, sum = 0, last = -1e8, c, k;
  scanf("%d%d", &n, &c);
  for (i = 1; i <= n; i++) {
    scanf("%d", &k);
    if (k - last > c) {
      sum = 1;
      last = k;
    } else {
      sum++;
      last = k;
    }
  }
  printf("%d", sum);
}
