#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  long long a[n], s = 1, x = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  x = a[0];
  for (long long i = 1; i < n; i++) {
    if (abs(x - a[i]) <= k) {
      x = a[i];
      s++;
    }
  }
  cout << s;
  return 0;
}
