#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b, d, sum = 0, ans = 0;
  cin >> n >> b >> d;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  for (int i = 0; i < n; i++)
    if (v[i] > b)
      continue;
    else if (sum + v[i] > d)
      sum = 0, ans++;
    else
      sum += v[i];
  cout << ans << endl;
  return 0;
}
