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