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