#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
void solve() {
  int n, b, d;
  cin >> n >> b >> d;
  int res = 0;
  int currMass = 0;
  for (int i = 0; i < n; i++) {
    int got;
    cin >> got;
    if (got > b) continue;
    currMass += got;
    if (currMass > d) {
      currMass = 0;
      res++;
    }
  }
  cout << res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
