#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main() {
  int i, n, b, d, number, emp;
  long long int total;
  while (cin >> n >> b >> d) {
    v.clear();
    for (i = 0; i < n; i++) {
      cin >> number;
      v.push_back(number);
    }
    total = emp = 0;
    for (i = 0; i < n; i++) {
      int x = v[i];
      if (x > b)
        continue;
      else {
        total += x;
        if (total > d) {
          emp++;
          total = 0;
        }
      }
    }
    cout << emp << "\n";
  }
  return 0;
}
