#include <bits/stdc++.h>
using namespace std;
int n, a;
vector<int> arr;
long long sumDist(int begin, int end) {
  long long ret = 0;
  for (int i = begin; i <= (int)(end - 1); i++) ret += (arr[i + 1] - arr[i]);
  return ret;
}
int main(int argc, const char* argv[]) {
  int n, b, d;
  cin >> n >> b >> d;
  int sum = 0, ans = 0;
  for (int i = 1; i <= (int)(n); i++) {
    int temp;
    cin >> temp;
    if (temp <= b) sum += temp;
    if (sum > d) ++ans, sum = 0;
  }
  cout << ans << endl;
  return 0;
}
