#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, t, c;
  cin >> n >> t >> c;
  vector<int> v(n), x(n);
  for (int i = 0; i < n; i++) {
    int p;
    cin >> p;
    if (p > t) {
      v[i] = 1;
    } else {
      v[i] = 0;
    }
  }
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      x[i] = v[i];
    } else {
      x[i] = x[i - 1] + v[i];
    }
  }
  int cnt = 0;
  for (int i = 1; (i + c - 1) < n; i++) {
    if (x[i + c - 1] - x[i - 1] == 0) {
      cnt++;
    }
  }
  if (c - 1 < n && c - 1 > -1) {
    if (x[c - 1] == 0) {
      cnt++;
    }
  }
  cout << cnt << endl;
}
int main() { solve(); }
