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