#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n, t, c, a = 0, r = 0;
  cin >> n >> t >> c;
  vector<int> v(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
  }
  for (int i = 1; i <= n; i++) {
    if (v[i] <= t) a++;
    if (a == c) {
      r++;
      a = c - 1;
    }
    if (v[i] > t) a = 0;
  }
  cout << r;
}
