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