#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t, c, ans = 0;
  cin >> n >> t >> c;
  int req = 0;
  while (n--) {
    int a;
    cin >> a;
    if (a > t)
      req = 0;
    else
      req++;
    if (req >= c) ans++;
  }
  cout << ans << endl;
}
