#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, b, d;
  scanf("%lld", &n), scanf("%lld", &b);
  scanf("%lld", &d);
  long long a[n + 1];
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
  }
  long long waste = 0, ans = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] <= b) {
      waste += a[i];
      if (waste > d) {
        ans++;
        waste = 0;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
