#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long N = 1e5 + 1;
vector<long long> g[N];
long long vis[N];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    long long a[n];
    for (long long i = 0; i < n; ++i) cin >> a[i];
    long long ct = 0;
    vector<long long> ex;
    for (long long i = 1; i < n; ++i) {
      long long val = abs(a[i - 1] - a[i]);
      if (val > k) {
        ex.push_back(a[i]);
      }
    }
    cout << n - ex.size() << "\n";
  }
}
