#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, k;
  cin >> n >> k;
  vector<int> a(n), ans;
  for (int &i : a) cin >> i;
  int cur = a[0];
  for (int i = 1; i < n; ++i) {
    if (abs(cur - a[i]) <= k) {
      ans.push_back(a[i]);
      cur = a[i];
    }
  }
  cout << ans.size() + 1 << "\n";
  return 0;
}
