#include <bits/stdc++.h>
using namespace std;
long long n, t, c, i, l, ans, a[10000000];
int main() {
  cin >> n >> t >> c;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n; i++) {
    if (a[i] <= t)
      l++;
    else
      l = 0;
    if (l >= c) ans++;
  }
  cout << ans << endl;
  return 0;
}
