#include <bits/stdc++.h>
using namespace std;
using namespace std;
long long fpow(long long x, long long y, long long p = 1000000007) {
  x = x % p;
  long long sum = 1;
  while (y) {
    if (y & 1) sum = sum * x;
    sum %= p;
    y = y >> 1;
    x = x * x;
    x %= p;
  }
  return sum;
}
long long inv(long long a, long long m = 1000000007) {
  long long c = m;
  long long y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long q = a / m;
    long long t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += c;
  return x;
}
long long add(long long a, long long b) {
  if (a < 0) a += 1000000007;
  if (b < 0) b += 1000000007;
  return (a % 1000000007 + b % 1000000007 + 1000000007) % 1000000007;
}
long long sub(long long a, long long b) {
  if (a < 0) a += 1000000007;
  if (b < 0) b += 1000000007;
  return (a % 1000000007 - b % 1000000007 + 1000000007) % 1000000007;
}
long long mul(long long a, long long b) {
  if (a < 0) a += 1000000007;
  if (b < 0) b += 1000000007;
  return ((a % 1000000007) * (b % 1000000007) + 1000000007) % 1000000007;
}
void setIO(string name = "") {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  if ((int)(name).size()) {
    freopen((name + ".in").c_str(), "r", stdin);
    freopen((name + ".out").c_str(), "w", stdout);
  }
}
int main() {
  setIO();
  long long n, k;
  cin >> n >> k;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long res = n;
  for (int i = 1; i < n; i++)
    if (abs(a[i] - a[i - 1]) > k) res--;
  cout << res;
}
