#include <bits/stdc++.h>
using namespace std;
long long int n, b, d, arr[1000000], sum = 0, ans = 0;
int main() {
  cin >> n >> b >> d;
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i < n; i++) {
    if (arr[i] <= b) sum += arr[i];
    if (sum > d) {
      sum = 0;
      ans++;
    }
  }
  if (sum > d) ans++;
  cout << ans << endl;
  return 0;
}
