#include <bits/stdc++.h>
using namespace std;
int n, t, c;
int main() {
  cin >> n >> t >> c;
  int s, co = 0, total = 0;
  for (int i = 0; i < n; i++) {
    cin >> s;
    if (s > t)
      co = 0;
    else
      co++;
    if (co >= c) total++;
  }
  cout << total << endl;
}
