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