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