#include <bits/stdc++.h>
using namespace std;
int a[300005];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
  }
  int ans = 1;
  for (int i = 0; i < n - 1; ++i) {
    if (abs(a[i] - a[i + 1]) <= k)
      ans++;
    else {
    }
  }
  cout << ans << endl;
  return 0;
}
