#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  vector<int> v;
  v.push_back(arr[0]);
  for (int i = 1; i < n; i++) {
    v.push_back(abs(arr[i] - arr[i - 1]));
  }
  int ans = 0;
  for (int i = 0; i < v.size(); i++) {
    if (v[i] <= k) ans++;
  }
  cout << ans;
}
