#include <bits/stdc++.h>
using namespace std;
vector<int> adj[200007];
int vis[200007];
int main() {
  int n, k, ar[300007];
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> ar[i];
  int cnt = 0;
  for (int i = 2; i <= n; i++) {
    if (abs(ar[i] - ar[i - 1]) > k) cnt++;
  }
  int mh = n - cnt;
  cout << mh << endl;
  return 0;
}
