#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, b, d;
  cin >> n >> b >> d;
  int waste = 0;
  int numCleans = 0;
  for (int i = 0; i < n; ++i) {
    int k;
    cin >> k;
    if (k > b) continue;
    waste += k;
    if (waste > d) {
      numCleans++;
      waste = 0;
    }
  }
  cout << numCleans << endl;
  return 0;
}
