#include <bits/stdc++.h>
using namespace std;
int n, maximum, d;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  while (cin >> n >> maximum >> d) {
    int ans = 0, now = 0;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      if (x > maximum) continue;
      now += x;
      if (now > d) ans++, now = 0;
    }
    cout << ans << endl;
  }
  return 0;
}
