#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, k, i, c, d, e = 0;
  cin >> n >> k;
  long long int a[n];
  cin >> a[0];
  c = a[0];
  for (i = 1; i < n; i++) {
    cin >> a[i];
    d = a[i];
    if (abs(c - d) <= k) {
      c = d;
      e++;
    }
  }
  cout << e + 1 << endl;
  return;
}
int main() { solve(); }
