#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int total = n;
  for (int i = 0; i < n - 1; i++) {
    if (abs(a[i] - a[i + 1]) > k) {
      int j = i + 1;
      while (j < n && abs(a[i] - a[j]) > k) {
        j++;
        total--;
      }
      i = j - 1;
    }
  }
  cout << total << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
