#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b, d;
  cin >> n >> b >> d;
  int waste = 0;
  int empt = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a > b) continue;
    waste += a;
    if (waste > d) {
      waste = 0;
      empt++;
    }
  }
  cout << empt << endl;
}
