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