#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return (b ? gcd(b, a % b) : a); }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long MOD = 1e9 + 7;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, b, d;
  cin >> n >> b >> d;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long ans = 0;
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] > b) continue;
    if (sum > d) {
      ans++;
      sum = 0;
    }
    sum += a[i];
  }
  if (sum > d) ans++;
  cout << ans;
}
