#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int ans[n];
  int a[n];
  ans[0] = 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0) continue;
    if (a[i] - a[i - 1] > k || a[i - 1] - a[i] > k) {
      ans[i] = ans[i - 1];
    } else {
      ans[i] = ans[i - 1] + 1;
    }
  }
  cout << ans[n - 1] << endl;
}
