#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    long long b, d, waste = 0, first, num = 0;
    cin >> b >> d;
    for (int i = 0; i < n; ++i) {
      scanf("%I64d", &first);
      if (first > b) continue;
      waste += first;
      if (waste > d) num++, waste = 0;
    }
    cout << num << endl;
  }
}
