#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int MAXN = 1e5 + 5;
long long a[MAXN];
int main() {
  long long m, n, i, j, k, d, ans = 0;
  scanf("%I64d %I64d %I64d", &m, &n, &d);
  long long now = 0;
  for (i = 1; i <= m; i++) {
    scanf("%I64d", &a[i]);
    if (a[i] <= n) {
      now += a[i];
      if (now > d) {
        now = 0;
        ans++;
      }
    }
  }
  cout << ans << endl;
}
