#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, b, d;
  cin >> n >> b >> d;
  long long a[n + 3], tm = 0, cnt = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > b) continue;
    tm = tm + a[i];
    if (tm > d) {
      cnt++;
      tm = 0;
    }
  }
  cout << cnt << endl;
}
