#include <bits/stdc++.h>
using namespace std;
multiset<pair<int, int> > q;
int ans = 0, c, t;
int a[200010];
int main() {
  int n;
  cin >> n >> t >> c;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    q.insert(make_pair(a[i], i));
    if (i + 1 >= c) {
      if ((*q.rbegin()).first <= t) ++ans;
      q.erase(make_pair(a[i - c + 1], i - c + 1));
    }
  }
  cout << ans;
}
