#include <bits/stdc++.h>
const int INF = 1e9;
using namespace std;
int n, b, d;
int a[100000];
void solve() {
  long long sum = 0;
  long long count = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] > b) continue;
    sum += a[i];
    if (sum > d) {
      count++;
      sum = 0;
    }
  }
  cout << count;
}
int main() {
  scanf("%d%d%d", &n, &b, &d);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  solve();
  printf("\n");
  return 0;
}
