#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a.at(i);
  }
  int now = a.at(0);
  int buf_ans = 1;
  for (int i = 1; i < n; i++) {
    if (abs(now - a.at(i)) <= k) {
      buf_ans++;
      now = a.at(i);
    }
  }
  cout << buf_ans << endl;
}
