#include using namespace std; #define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++) #define ALL(v) (v).begin(),(v).end() using ll=long long int; const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12; templateinline bool chmax(T& a,T b){if(ainline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;} int main(){ int n,a,b,x,y; cin>>n>>a>>b>>x>>y; vector h(n); rep(i,0,n)cin>>h[i]; int L=-1,R=inf; while(R-L>1){ int mid=(L+R)>>1; vector H(n); rep(i,0,n)H[i]=max(0,h[i]-mid); int cnt=0; rep(i,0,n){ int add=max(0,min(a-cnt,H[i]/x)); H[i]-=add*x; cnt+=add; } sort(ALL(H)); ll sum=0; rep(i,0,n-(a-cnt))sum+=H[i]; if(sum<=ll(b)*y)R=mid; else L=mid; } cout<