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