#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 coun = 0, cur = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] <= b) {
      cur += a[i];
    }
    if (cur > d) {
      coun++;
      cur = 0;
    }
  }
  cout << coun;
  return 0;
}
