#include <bits/stdc++.h>
const int MOD = 1e9 + 7;
int primes[100000];
using namespace std;
bool cmp(const pair<int, int>& a, const pair<int, int>& b) {
  return a.first > b.first;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, m, d;
  cin >> n >> m >> d;
  int a[n];
  vector<int> vec;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] <= m) {
      vec.push_back(a[i]);
    }
  }
  long long sum = 0, count = 0;
  for (int i = 0; i < vec.size(); i++) {
    sum += vec[i];
    if (sum <= d) {
      continue;
    } else {
      sum = 0;
      count++;
    }
  }
  cout << count;
  return 0;
}
