#include <bits/stdc++.h>
int main(void) {
  int n, b, d;
  scanf("%d%d%d", &n, &b, &d);
  int a[n];
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  int c = 0, s = 0;
  for (int i = 0; i < n; i++) {
    if (s > d) {
      s = 0;
      c++;
    }
    if (a[i] <= b) {
      s += a[i];
    }
  }
  if (s > d) {
    s = 0;
    c++;
  }
  printf("%d", c);
  return 0;
}
