#include <bits/stdc++.h>
using namespace std;
const char nl = '\n';
inline bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.first == b.first) return a.second < b.second;
  return a.first > b.first;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  return a * b / gcd<T>(a, b);
}
template <class T>
inline T power(T b, T p) {
  long long ans = 1;
  while (p--) ans *= b;
  return ans;
}
long long sumofdigit(long long n) {
  long long sum = 0;
  while (n) {
    sum = sum + n % 10;
    n = n / 10;
  }
  return sum;
}
void solve() {
  long long n, k;
  cin >> n >> k;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 1; i < n; i++) {
    a[i] = abs(a[i] - a[i - 1]);
  }
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] <= k) ans++;
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
}
