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