#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b, d, w = 0, count = 0, i;
  cin >> n >> b >> d;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > b) {
    } else {
      w = w + a[i];
    }
    if (w > d) {
      count++;
      w = 0;
    }
  }
  cout << count;
  return 0;
}
