#include <bits/stdc++.h>
using namespace std;
const int M = 2 * 1e5 + 100;
int s[M];
int main() {
  int n, t, c, k, i, ans;
  scanf("%d%d%d", &n, &t, &c);
  for (i = 1; i <= n; i++) {
    scanf("%d", &k);
    if (k <= t)
      k = 0;
    else
      k = 1;
    if (i == 0)
      s[i] = k;
    else
      s[i] = s[i - 1] + k;
  }
  if (s[c] == 0)
    ans = 1;
  else
    ans = 0;
  for (i = c + 1; i <= n; i++)
    if (s[i] - s[i - c] == 0) ans++;
  printf("%d", ans);
  return 0;
}
