#include <bits/stdc++.h>
const long long INF = (1LL << 61);
using namespace std;
int n, x, now, b, d, ans = 0;
int main() {
  cin >> n >> b >> d;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x > b) continue;
    now += x;
    if (now > d) ans++, now = 0;
  }
  cout << ans << endl;
}
