#include <bits/stdc++.h>
int main() {
  int n, i, j[100], k = 0, c = 0;
  scanf("%d%d", &n, &k);
  for (i = 1; i <= n; i++) {
    scanf("%d", &j[i]);
    if (j[i] - j[i + 1] <= k) c++;
  }
  printf("%d\n", c);
  return 0;
}
