#include <bits/stdc++.h>
using namespace std;
priority_queue<long long, vector<long long>, greater<long long> > pq;
queue<int> q1;
char ar2[1000][1000];
bool vis[1000][1000] = {0};
int arr[1000][1000] = {0};
map<int, int> mp;
set<string>::iterator it;
bitset<64> bt;
set<string> st;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long n, long long m) { return (n * m) / gcd(n, m); }
bool prime(long long n) {
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  int b, n, d;
  long long sum = 0, c = 0;
  cin >> n >> b >> d;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x <= b) {
      sum += x;
      if (sum > d) c++, sum = 0;
    }
  }
  cout << c << endl;
}
