#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, t, c, danger = 0;
  cin >> n >> t >> c;
  std::vector<long long> crime(n);
  for (long long i = 0; i < n; i++) cin >> crime[i];
  long long ans = 0;
  for (long long i = 0; i < c; i++) {
    if (crime[i] <= t)
      danger++;
    else
      danger = 0;
  }
  if (danger == c) {
    ans = 1;
    danger = c - 1;
  }
  long long i = c;
  while (i < n) {
    if (crime[i] <= t) {
      danger++;
      if (danger == c) {
        ans += 1;
        danger = c - 1;
      }
    } else {
      danger = 0;
    }
    i++;
  }
  cout << ans << "\n";
  return 0;
}
