#include <bits/stdc++.h>
using namespace std;
int a[100000];
int main() {
  int N, b, d, sum = 0, c = 0;
  cin >> N >> b >> d;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    if (a[i] > b) a[i] = 0;
  }
  for (int i = 0; i < N; i++) {
    sum += a[i];
    if (sum > d) {
      sum = 0;
      c++;
    }
  }
  cout << c;
}
