#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1}, dy[] = {1, -1, 0, 0, 1, -1, -1, 1};
int main() {
  int n, t, c, x, all = 0, res = 0;
  scanf("%i %i %i", &n, &t, &c);
  for (int a = 0; a < n; a++) {
    scanf("%i", &x);
    if (x <= t) {
      all++;
      if (all >= c) res++;
      continue;
    }
    all = 0;
  }
  cout << res << endl;
  return 0;
}
