#include <bits/stdc++.h>
using namespace std;
long long n, k, a[300001];
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (long long i = 0; i < (n); i++) cin >> a[i];
  long long cnt = 1, now = a[0];
  for (long long i = 1; i < (n); i++)
    if (labs(a[i] - now) <= k) {
      cnt++;
      now = a[i];
    }
  cout << cnt << endl;
  return 0;
}
