#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
int main() {
  long long i, j, k = 0, a, b, c, d = 0, m = 0;
  cin >> a >> b >> c;
  int ar[a];
  for (i = 1; i <= a; i++) {
    cin >> ar[i];
  }
  for (i = 1; i <= a; i++) {
    if (ar[i] <= b) {
      d++;
    } else {
      d = 0;
    }
    if (d >= c) {
      m++;
    }
  }
  cout << m << endl;
  return 0;
}
