#include <bits/stdc++.h>
using namespace std;
const int inf = (int)(1e9) + 100;
const int mod = (int)(1e9) + 100;
const int maxn = (int)(2e5) + 100;
long long n, a[maxn], b, d, cur, cnt = 0;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> b >> d;
  for (int i = 0; i < n; i++) cin >> a[i];
  cur = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] > b)
      continue;
    else {
      cur += a[i];
      if (cur > d) cnt++, cur = 0;
    }
  }
  cout << cnt;
  return 0;
}
