#include <bits/stdc++.h>
using namespace std;
using vl = vector<long long>;
using vs = vector<string>;
using vc = vector<char>;
using ll = long long;
using vvl = vector<vector<ll> >;
using vvc = vector<vector<char> >;
using vd = vector<double>;
bool is_prime(int x) {
  if (x <= 1) return false;
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
int wa(ll x) {
  ll sum = 0;
  while (x != 0) {
    sum += x % 10;
    x /= 10;
  }
  return sum;
}
ll p = 0, q = 0, r = 0;
int main() {
  ll n, k;
  cin >> n >> k;
  vl a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  q = a[0];
  for (int i = 1; i < n; i++) {
    if (abs(a[i] - q) <= k) {
      p++;
      q = a[i];
    }
  }
  cout << p + 1 << endl;
  ;
}
