#include <bits/stdc++.h>
using namespace std;
void read_file(bool outToFile = true) {}
int n, b, d;
int A[100000 + 9];
int main() {
  while (scanf("%d%d%d", &n, &b, &d) != EOF) {
    for (int i = 0; i < n; i++) scanf("%d", &A[i]);
    int ans = 0, cur = 0;
    for (int i = 0; i < n; i++) {
      if (A[i] > b) continue;
      cur += A[i];
      if (cur > d) ans++, cur = 0;
    }
    printf("%d\n", ans);
  }
}
