#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
int main() {
  ll N, K;
  cin >> N >> K;
  vector<ll> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int ans = 0;
  int before = A[0];
  for (int i = 1; i < N; i++) {
    if (abs(A[i] - before) <= K) {
      ans++;
      before = A[i];
    }
  }
  cout << ans + 1;
}
