#include <bits/stdc++.h>
int main() {
  long N, K, a = 0, b = 0;
  scanf("%ld%ld", &N, &K);
  long A[300000], B[300000];
  while (a < N) {
    scanf("%ld", &A[a]);
    a++;
  }
  for (a = 0; a < N - 1; a++) {
    if (labs(A[a] - A[a + 1]) <= K) {
      B[b] = A[a];
      b++;
    }
  }
  printf("%ld", b + 1);
}
