#include <bits/stdc++.h>
using namespace std;
inline int Int() {
  int x;
  cin >> x;
  return x;
}
inline long long Long() {
  long long x;
  cin >> x;
  return x;
}
inline float Float() {
  float x;
  cin >> x;
  return x;
}
inline double Double() {
  double x;
  cin >> x;
  return x;
}
inline void Yes() { cout << "Yes" << endl; }
inline void No() { cout << "No" << endl; }
inline void YES() { cout << "YES" << endl; }
inline void NO() { cout << "NO" << endl; }
const int N = (int)2e5 + 5;
const int maxN = (int)1e6 + 6;
const long long Mod = (long long)1e9 + 7;
const int inf = (int)2e9;
const long long Inf = (long long)1e18;
int main() {
  long long n, k, i, cnt = 0, x = 0, y = 1;
  cin >> n >> k;
  long long a[n];
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < n - 1; i++) {
    y = i + 1;
    if (abs(a[x] - a[y]) <= k) {
      cnt++;
      x = i + 1;
    }
  }
  cout << cnt + 1 << endl;
  return 0;
}
