#include <bits/stdc++.h>
using namespace std;
double getComb(double n, double x) {
  double r = 1.0;
  for (double i = 1.0; i <= x; i += 1) {
    double a = n - i + 1;
    double b = a / i;
    r *= b;
  }
  return r;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, b;
  long long int d, i;
  cin >> n;
  cin >> b;
  cin >> d;
  long long int A[n];
  long long int B[n];
  long long int j, s;
  for (i = 0; i < n; i += 1) {
    cin >> A[i];
  }
  j = 0;
  for (i = 0; i < n; i += 1) {
    if (A[i] <= b) {
      B[j] = A[i];
      j++;
    }
  }
  s = 0;
  long long int c;
  c = 0;
  for (i = 0; i < j; i += 1) {
    s += B[i];
    if (s > d) {
      c += 1;
      s = 0;
    }
  }
  if (s > d) {
    s = 0;
    c += 1;
  }
  cout << c << "\n";
  return 0;
}
