#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, b, d, temp;
  cin >> n >> b >> d;
  long long sum = 0, count = 0;
  for (int i = 0; i < n; ++i) {
    cin >> temp;
    if (temp <= b) {
      sum += temp;
      if (sum > d) {
        sum = 0;
        count++;
      }
    }
  }
  cout << count;
}
