#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
int main() {
  int n, k;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int chafen[n];
  for (int i = 0; i < n - 1; i++) {
    chafen[i] = a[i + 1] - a[i];
  }
  int cnt = 0;
  for (int i = 0; i < n - 1; i++) {
    if (abs(chafen[i]) <= k) cnt++;
  }
  cout << cnt + 1 << endl;
}
