#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, b, d;
  cin >> n >> b >> d;
  int ans = 0, cur = 0;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    if (x > b) continue;
    cur += x;
    if (cur > d) {
      ++ans;
      cur = 0;
    }
  }
  cout << ans;
}
