#include <bits/stdc++.h>
using namespace std;
int n, b, d;
int main() {
  while (cin >> n >> b >> d) {
    int sum = 0, x, ans = 0;
    for (int i = 0; i < n; ++i) {
      scanf("%d", &x);
      if (x > b) continue;
      sum += x;
      if (sum > d) {
        ans++;
        sum = 0;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
