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