#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, tc = 0;
  long long n, b, d;
  cin >> n >> b >> d;
  long long cnt = 0, ans = 0;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    if (x > b) continue;
    ans += x;
    if (ans > d) cnt++, ans = 0;
  }
  cout << cnt << endl;
  return 0;
}
