#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b, d, result = 0, size = 0, current;
  cin >> n >> b >> d;
  while (n != 0) {
    cin >> current;
    if (current > b) {
    } else {
      size += current;
      if (size > d) {
        size = 0;
        ++result;
      }
    }
    --n;
  }
  cout << result;
  return 0;
}
