#include <bits/stdc++.h>
int int_comp(const void *e1, const void *e2) {
  const int *n1_p = (const int *)e1;
  const int *n2_p = (const int *)e2;
  if (*n1_p > *n2_p) {
    return 1;
  } else if (*n1_p == *n2_p) {
    return 0;
  } else {
    return -1;
  }
}
int main() {
  int size, k;
  scanf("%d%d\n", &size, &k);
  int array[size];
  for (int i = 0; i < size; i++) {
    scanf("%d", &array[i]);
  }
  int cevap = 0;
  for (int i = 0; i < size - 1; i++) {
    int a = abs(array[i] - array[i + 1]);
    if (a <= k) {
      cevap++;
    }
  }
  printf("%d\n", cevap + 1);
  return 0;
}
