#include <bits/stdc++.h>
int a[1234567], mark[1234567], adj[101][101];
char st[1000001];
using namespace std;
int main() {
  int i, j, n, m, count = 0, sum = 0, temp = 0, l, ans = 0, k, mod = 1000000007,
                  t;
  int p, w, r, s, e, x, y;
  int c;
  vector<int> v;
  vector<int>::iterator it;
  set<int> set;
  queue<int> q;
  map<int, int> map;
  pair<int, int> pair[1001];
  cin >> n >> t >> c;
  for (i = 0; i < n; i++) {
    cin >> l;
    if (l > t)
      count = 0;
    else {
      count++;
      if (count >= c) ans++;
    }
  }
  cout << ans;
  return 0;
}
