#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c, t, m;
  cin >> n >> t >> c;
  int y = 0, s = 0;
  for (int i = 0; i < n; i++) {
    cin >> m;
    if (y >= c) s++;
    if (m <= t)
      y++;
    else
      y = 0;
  }
  if (y >= c) s++;
  cout << s;
  return 0;
}
