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