#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, b, d, sum, count, i;
  long long int A[123456];
  cin >> n >> b >> d;
  for (i = 0; i < n; i++) {
    cin >> A[i];
  }
  sum = 0;
  count = 0;
  for (i = 0; i < n; i++) {
    if (A[i] > b) {
      continue;
    } else {
      sum = sum + A[i];
      if (sum > d) {
        count = count + 1;
        sum = 0;
      }
    }
  }
  cout << count;
  return 0;
}
