#include <bits/stdc++.h>
using namespace std;
int f, ans, pos, i, j, k, n, t, c, a[200010], b[200010];
int main() {
  cin >> n >> t >> c;
  for (i = 0; i < n; i++) cin >> a[i];
  memset(b, 0, sizeof(b));
  if (a[0] <= t) b[0] = 1;
  for (i = 1; i < n; i++)
    if (a[i] <= t)
      b[i] = b[i - 1] + 1;
    else
      b[i] = 0;
  ans = 0;
  for (i = 0; i < n; i++)
    if (b[i] >= c) ans++;
  cout << ans;
  return 0;
}
