#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
const int INF = 1e9 + 7;
const int N = 3e5 + 7;
const int M = 1e6 + 7;
long long a[N];
signed main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long ans = 0;
  long long g = 0;
  for (int i = 2; i <= n; i++) {
    long long f = g + (a[i] - a[i - 1]);
    if (abs(f) <= abs(a[i] - a[i - 1]))
      g += a[i] - a[i - 1];
    else
      g = a[i] - a[i - 1];
    if (abs(g) <= k) ans++;
  }
  cout << ans + 1 << endl;
  return 0;
}
