#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, b, d;
  cin >> n >> b >> d;
  int cur = 0, cnt = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (a > b) continue;
    cur += a;
    if (cur > d) {
      cnt++;
      cur = 0;
    }
  }
  if (cur > d) cnt++;
  cout << cnt << endl;
  return 0;
}
