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