#include <bits/stdc++.h>
using namespace std;
int getcount(int* arr, int st, int end, int value) {
  if (st >= end) {
    return 0;
  }
  if (abs(arr[st] - arr[st - 1]) <= value) {
    return 1 + getcount(arr, st + 1, end, value);
  }
  return getcount(arr, st + 1, end, value);
}
int main() {
  int n, k;
  cin >> n >> k;
  int* arr = new int[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  cout << getcount(arr, 1, n, k) + 1 << endl;
}
