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