#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, c;
  cin >> n >> t >> c;
  vector<int> indx;
  int q;
  for (int i = 0; i < n; i++) {
    cin >> q;
    if (q > t) indx.push_back(i + 1);
  }
  int answ = 0;
  int prev = 0;
  for (int i = 0; i < indx.size(); i++) {
    int t = indx[i] - c - prev;
    if (t > 0) answ += t;
    prev = indx[i];
  }
  q = n - prev - c + 1;
  if (q > 0) answ += q;
  cout << answ << endl;
  return 0;
}
