#include <bits/stdc++.h>
using namespace std;
int main() {
  int manyoranges, maxsize, maxwaste, orange, wastestorage = 0,
                                              emptythewaste = 0;
  int i;
  cin >> manyoranges >> maxsize >> maxwaste;
  for (i = 0; i < manyoranges; i++) {
    cin >> orange;
    if (orange <= maxsize) {
      wastestorage += orange;
    }
    if (wastestorage > maxwaste) {
      emptythewaste++;
      wastestorage = 0;
    }
  }
  cout << emptythewaste << endl;
}
