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