#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, b, d;
  cin >> n >> b >> d;
  int net_juice = 0, ans = 0;
  while (n--) {
    int temp;
    cin >> temp;
    if (temp > b)
      continue;
    else {
      net_juice += temp;
      if (net_juice > d) {
        ++ans;
        net_juice = 0;
      }
    }
  }
  cout << ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int t = 1;
  while (t--) {
    solve();
    cout << '\n';
  }
}
