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