#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = 1000000000;
class UnionFind {
 public:
  vector<int> par;
  UnionFind(int N) {
    par.resize(N);
    for (int i = 0; i < N; i++) par[i] = i;
  }
  int root(int A) {
    if (par[A] == A) return A;
    return par[A] = root(par[A]);
  }
  bool unite(int A, int B) {
    A = root(A);
    B = root(B);
    if (A == B) {
      return false;
    }
    par[B] = A;
    return true;
  }
  bool same(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    return rx == ry;
  }
};
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n), s(n - 1);
  for (long long int i = (0); i < (n); i++) cin >> a[i];
  if (n == 1) {
    cout << 1 << endl;
    return 0;
  }
  for (long long int i = (0); i < (n - 1); i++) {
    s[i] = abs(a[i + 1] - a[i]);
  }
  int ans = n;
  for (long long int i = (0); i < (n - 1); i++) {
    if (s[i] > k) {
      if (i == n - 2) {
        ans--;
        break;
      }
      ans--;
      s[i] = abs(a[i] - a[i + 2]);
    }
  }
  cout << ans << endl;
  return 0;
}
