#include using namespace std; #include using namespace atcoder; using ll=long long; using Graph=vector>>; #define INF 1000000000000000000 #define MOD 998244353 #define MAX 200000 int main(){ int N; ll A,B,X,Y; cin>>N>>A>>B>>X>>Y; vector H(N); for(int i=0;i>H[i]; } for(int i=0;i(H[i]/X,A); A-=cnt; H[i]-=A*X; } sort(H.begin(),H.end()); ll sum=0; for(int i=0;i