#include <bits/stdc++.h>
const double PI = acos(-1);
using namespace std;
int A[300001];
int diff[300001];
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int N, K;
  cin >> N >> K;
  for (int i = 1; i <= N; i++) cin >> A[i];
  for (int i = 2; i <= N; i++) {
    diff[i] = A[i] - A[i - 1];
  }
  int idx = 2;
  int cnt = N;
  while (idx <= N) {
    if (abs(diff[idx]) > K) {
      int temp = diff[idx];
      int i;
      int c;
      for (i = idx - 1; i >= 2; i--) {
        if (abs(temp + diff[i]) > K) {
          temp += diff[i];
        } else {
          break;
        }
      }
      c = idx - i;
      temp = diff[idx];
      for (i = idx + 1; i <= N; i++) {
        if (abs(temp + diff[i]) > K) {
          temp += diff[i];
        } else {
          break;
        }
      }
      if (c < i - idx) {
        cnt -= c;
        idx++;
      } else {
        cnt -= i - idx;
        diff[i] += temp;
        idx = i + 1;
      }
    } else
      idx++;
  }
  cout << cnt;
}
