#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b, d;
  cin >> n >> b >> d;
  int oranges[n];
  for (int i = 0; i < n; i++) cin >> oranges[i];
  int sum = 0, emptying = 0;
  for (int i = 0; i < n; i++) {
    if (oranges[i] <= b) {
      sum += oranges[i];
      if (sum > d) {
        sum = 0;
        emptying++;
      }
    }
  }
  cout << emptying;
}
