#include <bits/stdc++.h>
using namespace std;
int tree[1000005], arr[200005];
void build(int node, int b, int e) {
  if (b == e) {
    tree[node] = arr[b];
    return;
  }
  int mid = (b + e) / 2;
  int left = node * 2;
  int right = left + 1;
  build(left, b, mid);
  build(right, mid + 1, e);
  tree[node] = max(tree[left], tree[right]);
}
int query(int node, int b, int e, int i, int j) {
  if (i <= b && j >= e) return tree[node];
  if (i > e || j < b) return 0;
  int mid = (b + e) / 2;
  int left = node * 2;
  int right = left + 1;
  int p = query(left, b, mid, i, j);
  int q = query(right, mid + 1, e, i, j);
  return max(p, q);
}
int main() {
  int n, t, c;
  scanf("%d %d %d", &n, &t, &c);
  for (int i = 1; i <= n; i++) scanf("%d", &arr[i]);
  build(1, 1, n);
  long long ans = 0;
  for (int i = 1, j = i + c - 1; j <= n; j++, i++) {
    int p = query(1, 1, n, i, j);
    if (p <= t) ans++;
  }
  cout << ans << endl;
}
