#include <bits/stdc++.h>
using namespace std;
int pimoney, toppingmoney;
int picalory;
int ans;
vector<int> toppingcalory;
int func(int n, int scalory, int cost) {
  if (n == toppingcalory.size()) {
    if (cost == 0) return 0;
    return scalory / cost;
  }
  if (toppingcalory[n] < toppingmoney) return scalory / cost;
  return max(func(n + 1, scalory + toppingcalory[n], cost + toppingmoney),
             func(n + 1, scalory, cost));
}
int main() {
  int N;
  cin >> N >> pimoney >> toppingmoney >> picalory;
  int calory;
  for (int i = 0; i < N; i++) {
    cin >> calory;
    toppingcalory.push_back(calory);
  }
  sort(toppingcalory.begin(), toppingcalory.end(), greater<int>());
  ans = func(0, picalory, pimoney);
  cout << ans << endl;
  return 0;
}
