#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int mod = 1000000007;
const int N = 200005;
int num[N];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    scanf("%d", &num[i]);
  }
  int cnt = 1;
  for (int i = n - 2; i >= 0; i--) {
    if (num[i + 1] - num[i] <= m)
      cnt++;
    else
      break;
  }
  cout << cnt << endl;
}
