#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, i, t, c, ara[200001], p = 0, q = 0;
  cin >> n >> t >> c;
  for (i = 0; i < n; i++) {
    cin >> ara[i];
    p++;
    if (ara[i] > t) p = 0;
    if (p >= c) q++;
  }
  cout << q;
  return 0;
}
