#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, x, i, sum = 0, ans = 0;
  cin >> a >> b >> c;
  for (i = 0; i < a; i++) {
    cin >> x;
    if (x > b) continue;
    sum += x;
    if (sum > c) {
      ++ans;
      sum = 0;
    }
  }
  cout << ans << endl;
}
