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