#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, k;
  cin >> n >> k;
  long long int arr[n];
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  long long int c = 0;
  for (long long int i = 1; i < n; i++) {
    if (abs(arr[i - 1] - arr[i]) <= k) c++;
  }
  cout << c + 1 << "\n";
  return 0;
}
