#include <bits/stdc++.h>
using namespace std;
int a[500000], t, c, n, ans = 0;
int main() {
  scanf("%d%d%d", &n, &t, &c);
  int l = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] > t)
      l = 0;
    else {
      l++;
      if (l >= c) ans++;
    }
  }
  cout << ans;
  return 0;
}
