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