#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
const int mod = 1000000007;
using namespace std;
long long int binpow(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) {
      res = (res * a);
    }
    a = (a * a);
    b >>= 1;
  }
  return res;
}
void dex(int a) {
  if (a == 1)
    cout << "1\n";
  else if (a == -1)
    cout << "-1\n";
  else if (a == 0)
    cout << "0\n";
  else if (a == 2)
    cout << "YES\n";
  else if (a == 3)
    cout << "NO\n";
  else if (a == 4)
    cout << "yes\n";
  else if (a == 5)
    cout << "no\n";
}
long long int fermat_inv(long long int y) { return binpow(y, mod - 2); }
long long int fact[100005];
long long int finv[100005];
void factorial(int n) {
  fact[0] = 1;
  finv[0] = 1;
  for (int i = 1; i <= n; i++)
    fact[i] = fact[i - 1] * i, fact[i] %= mod, finv[i] = fermat_inv(fact[i]);
}
long long int ncr(long long int n, long long int r) {
  if (n < r)
    return 0;
  else {
    long long int x = finv[r] * finv[n - r] % mod;
    return fact[n] * x % mod;
  }
}
bool prime[10000001];
void seive() {
  memset(prime, 1, sizeof(prime));
  for (long long int i = 2; i * i <= 10000001; i++) {
    if (prime[i] == 1) {
      for (long long int j = i * i; j <= 10000001; j += i) {
        prime[j] = 0;
      }
    }
  }
}
const int p_o = 53;
vector<long long int> p_pow;
void ffpow(long long int n) {
  p_pow.resize(n);
  p_pow[0] = 1;
  for (long long int i = 1; i < n; i++) {
    p_pow[i] = (p_pow[i - 1] * p_o) % MOD;
  }
}
long long int Hash(string const& s) {
  long long int res = 0;
  long long int j = 0;
  for (auto i : s) {
    res += (((i - 'a' + 1) % MOD) * (p_pow[j] % MOD)) % MOD;
    j++;
  }
  return res;
}
vector<long long int> adj[100005];
vector<long long int> vis(100005, 0);
vector<long long int> R(100005, 0);
vector<long long int> par(100005);
vector<long long int> col(100005);
long long int r = 0;
void dfs(long long int node) {
  r++;
  vis[node] = 1;
  for (auto i : adj[node]) {
    if (!vis[i]) {
      par[i] = node;
      dfs(i);
    }
  }
}
int Find(int x) {
  if (par[x] < 0) return x;
  return par[x] = Find(par[x]);
}
void Union(int x, int y) {
  if (R[x] > R[y]) {
    par[x] += par[y];
    R[x] += R[y];
    par[y] = x;
  } else {
    par[y] += par[x];
    R[y] += R[x];
    par[x] = y;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, k;
  cin >> n >> k;
  long long int a[n];
  vector<long long int> v;
  long long int ct = 1;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (long long int i = 1; i < n; i++) {
    if (abs(a[i] - a[i + 1]) <= k) {
      ct++;
    } else {
      a[i + 1] = a[i];
    }
  }
  cout << ct << "\n";
  return 0;
}
