#include <bits/stdc++.h>
using namespace std;
long long a, b[5555555], c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t,
    u, v, w, x, y, z, aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk, ll, mm, nn,
    oo, pp, qq, rr, ss, tt, uu, vv, ww, xx, yy, zz;
int main() {
  cin >> a >> d >> e;
  for (c = 1; c <= a; c++) {
    cin >> b[c];
  }
  for (f = 1; f <= a; f++) {
    if (b[f] <= d) {
      g = g + b[f];
      if (g > e) {
        g = 0;
        h++;
      }
    }
  }
  cout << h;
}
