#include <bits/stdc++.h>
const int INF = 1 << 30;
const long long LINF = 1LL << 60;
const long long int MOD = 1000000007;
using namespace std;
using ll = long long;
using P = pair<int, int>;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  ll n, k;
  cin >> n >> k;
  vector<ll> a(n);
  for (long long i = 0; i < (n); ++i) cin >> a[i];
  ll back = a.front();
  ll res = 0;
  for (long long i = 0; i < (n); ++i) {
    while (i < n && k < abs(back - a[i])) i++;
    ++res;
    back = a[i];
  }
  cout << res << "\n";
  return 0;
}
