#include <bits/stdc++.h>
using namespace std;
long long int n, k, res, a[100005];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  for (int i = 1; i < n; ++i) {
    if (abs(a[i] - a[i + 1]) > k) {
      for (int j = i + 2; j <= n; ++j) {
        if (abs(a[i] - a[j]) <= k) {
          i = j - 1;
          res++;
          break;
        }
      }
    } else {
      res++;
    }
  }
  cout << res + 1;
  return 0;
}
