#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, t, c, r = 0, s = 0;
  cin >> n >> t >> c;
  for (int i = 1; i <= n; i++) {
    long long int x;
    cin >> x;
    if (x <= t)
      r++;
    else
      r = 0;
    if (r >= c) s++;
  }
  cout << s;
}
