#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int maxn = 100000 + 100;
int o[maxn];
int main(int argc, char* argv[]) {
  ios::sync_with_stdio(false);
  long long n, b, d, sum = 0, ans = 0;
  cin >> n >> b >> d;
  for (int i = 0; i < n; i++) cin >> o[i];
  for (int i = 0; i < n; i++) {
    if (o[i] > b) continue;
    sum += o[i];
    if (sum > d) ans++, sum = 0;
  }
  cout << ans << endl;
  return 0;
}
