#include <bits/stdc++.h>
int main() {
  int n, t, c, i, a, temp = 0, sum = 0;
  scanf("%d%d%d", &n, &t, &c);
  for (i = 0; i < n; i++) {
    scanf("%d", &a);
    if (a <= t)
      temp++;
    else
      temp = 0;
    if (temp >= c) sum++;
  }
  printf("%d", sum);
  return 0;
}
