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