#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O0")
const long long int mod = 1e9 + 7;
const long long int INF = 1e18;
using Graph = vector<vector<long long int>>;
using V = vector<long long int>;
using P = pair<long long int, long long int>;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << setprecision(15) << fixed;
  chrono::system_clock::time_point start, end;
  start = chrono::system_clock::now();
  long long int n, k;
  cin >> n >> k;
  V a(n);
  for (long long int i = 0; i < (n); ++i) cin >> a[i];
  long long int t = a[0];
  long long int ans = 1;
  for (long long int i = 0; i < (n - 1); ++i) {
    if (abs(t - a[i + 1]) <= k) {
      ans += 1;
      t = a[i + 1];
    }
  }
  cout << ans << '\n';
  end = chrono::system_clock::now();
  auto elapsed =
      chrono::duration_cast<chrono::milliseconds>(end - start).count();
  cerr << elapsed << "ms" << '\n';
}
