#include <bits/stdc++.h>
using namespace std;
int toInt(string s) {
  int sm;
  stringstream second(s);
  second >> sm;
  return sm;
}
int main() {
  long long n, b, d;
  cin >> n >> b >> d;
  long long ans = 0;
  long long s = 0;
  while (n--) {
    long long x;
    cin >> x;
    if (x > b) continue;
    s += x;
    if (s > d) {
      s = 0;
      ans++;
    }
  }
  cout << ans << '\n';
  return 0;
}
