#include <bits/stdc++.h>
using namespace std;
const int mxN = 300001;
int a[mxN];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    a[i] = fabs(a[i] - a[i - 1]);
  }
  int ans = 0;
  for (int i = 1; i <= n; ++i) {
    if (a[i] <= k) ans++;
  }
  cout << ans;
  return 0;
}
