#include <bits/stdc++.h>
using namespace std;
int x[200009];
int fin;
int main() {
  int n, c, t;
  cin >> n >> t >> c;
  for (int i = 1; i <= n; ++i) {
    int a;
    cin >> a;
    if (a > t)
      x[i] = x[i - 1] + 1;
    else
      x[i] = x[i - 1];
  }
  for (int i = 1; i <= n; ++i) {
    if (i + c - 1 <= n && x[i + c - 1] - x[i - 1] == 0) fin++;
  }
  cout << fin;
  return 0;
}
