#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, c, o = 0, j = -1, r, k = 1;
  int a[200100], b[200100];
  cin >> n >> t >> c;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > t) {
      k = ((i - j) - c);
      j = i;
      if (k > 0) o += k;
    }
  }
  k = n - j - c;
  if (k > 0) o += k;
  cout << o;
  return 0;
}
