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