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