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