#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = (int)2e5 + 10;
const int M = (int)1e3 + 4;
const int INF = (int)0x3f3f3f3f;
const long long MOD = 1e9 + 7;
int arr[N];
long long n, t, c, ways1, ways2(0);
int idx = 0;
int main() {
  std::ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> t >> c;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  for (int i = 0; i < n; i++) {
    arr[i] <= t ? ++ways1 : ways1 = 0;
    if (ways1 >= c) {
      ways2++;
    }
  }
  cout << ways2 << "\n";
  return 0;
}
