#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, b, d, sum = 0, c = 0, x;
  cin >> n >> b >> d;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x <= b) sum += x;
    if (sum > d) {
      c++;
      sum = 0;
    }
  }
  cout << c << endl;
  return 0;
}
