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