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