#include <bits/stdc++.h>
using namespace std;
long long ipow(long long a, long long b) {
  long long res = 1;
  while (true) {
    if (b & 1) res *= a;
    b >>= 1;
    if (!b) break;
    a *= a;
  }
  return res;
}
void solve() {
  long long n, b, d;
  cin >> n >> b >> d;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long currsum = 0, numcler = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] > b)
      continue;
    else {
      currsum += a[i];
      if (currsum > d) {
        numcler++;
        currsum = 0;
      }
    }
  }
  cout << numcler;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
}
