#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, n;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> b;
  for (int i = 0; i < n; i++) {
    if (abs(a[i] - a[i + 1]) <= k)
      b.push_back(a[i]);
    else {
      b.push_back(a[i]);
      i++;
    }
  }
  cout << b.size() << endl;
}
