#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n, b, d, waste = 0, c = 0;
  scanf("%ld%ld%ld", &n, &b, &d);
  long int a[n];
  for (long int i = 0; i < n; i++) scanf("%ld", &a[i]);
  for (int i = 0; i < n; i++) {
    if (a[i] > b)
      continue;
    else {
      waste = waste + a[i];
    }
    if (waste > d) {
      waste = 0;
      c++;
    }
  }
  printf("%d", c);
  return 0;
}
