#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, w;
  int ct = 0, t = 0;
  cin >> n >> s >> w;
  int i, a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n == 1 && a[0] == 1 && s == a[0] && w == 1) {
    cout << 0;
    return 0;
  }
  for (i = 0; i < n; i++) {
    if (a[i] <= s) {
      t += a[i];
    }
    if (t > w) {
      ct++;
      t = 0;
    }
  }
  cout << ct;
  return 0;
}
