#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<vector>
using namespace std;
const int maxn = 2e5 + 10;
struct node {
	char c;
	int t;
	node(char cc=' ',int tt=0):c(cc),t(tt){}
}a[maxn];
vector<node>ans1, ans2;
int dp[maxn];
int main() {
	int t;
	scanf("%d", &t);
	int cnt = 1;
	while (t--) {
		int n;
		scanf("%d", &n);
		for (int i = 1; i <= n; i++) dp[i] = 1;
		for (int i = 1; i <= n; i++) {
			char c;
			cin >> c;
			a[i].c = c;
			a[i].t = i;
		}
		ans1.push_back(node(a[1].c, a[1].t));
		for (int i = 2; i <= n; i++) {
			if (ans1[ans1.size() - 1].c != a[i].c) {
				dp[i] = dp[ans1[ans1.size() - 1].t];//让这两个相等
				ans1.push_back(node(a[i].c, a[i].t));

			}
			else  if (!ans2.size() || ans2[ans2.size() - 1].c != a[i].c) {
				if (!ans2.size()) {
					ans2.push_back(node(a[i].c, a[i].t));
					dp[i] = ++cnt;
				}
				else {
					dp[i] = dp[ans2[ans2.size() - 1].t];//让这两个相等
					ans2.push_back(node(a[i].c, a[i].t));
				}
			}
			else {
				ans1.clear();
				ans2.clear();
				ans1.push_back(node(a[i].c, a[i].t));
				dp[i] = ++cnt;
			}

		}
		printf("%d\n", cnt);
		for (int i = 1; i <= n; i++) printf("%d ", dp[i]);
		printf("\n");
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
const int maxn = 2e5 + 10;
string a;
int dp[maxn];//dp 表示的是对应的坐标值
int visit[maxn];
int main() {
	int t;
	scanf("%d", &t);
	while (t--) {
		int n;
		for (int i = 0; i < maxn; i++) dp[i] = 1;
		memset(visit, 0, sizeof(visit));
		cin >> n >> a;
		int cnt = 1;
		if (a[0] != a[1]) visit[0] = 1,visit[1]=1,dp[1]=1,dp[0]=1;
		for (int i = 1; i < a.size(); i++) {
			if (a[i] != a[i - 1]) {
				visit[i] = 1;
				dp[i] = dp[i - 1];
			}
			else {
				int flag = 0;
				for (int j = 0; j < i; j++) {
					if (!visit[j] && a[j] != a[i]) {
						visit[j] = 1;
						dp[i] = dp[j];
						flag = 1;
						break;
					}
				}
				if (!flag) dp[i] = ++cnt;
			}
		}
		printf("%d\n", cnt);
		for (int i = 0; i < a.size(); i++) printf("%d ", dp[i]);
		printf("\n");
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
const int maxn = 2e5 + 10;
string a;
int dp[maxn];//dp 表示的是对应的坐标值
int visit[maxn];
int main() {
	int t;
	scanf("%d", &t);
	while (t--) {

		int n;
		for (int i = 0; i < maxn; i++) dp[i] = 1;
		memset(visit, 0, sizeof(visit));
		cin >> n >> a;
		int cnt = 1;
		for (int i = 1; i < a.size(); i++) {
			if (a[i] != a[i - 1]) {
				visit[i - 1] = 1;
				visit[i] = 1;
				dp[i] = dp[i - 1];
			}
			else {
				int flag = 0;
				for (int j = 0; j < i; j++) {
					if (!visit[j] && a[j] != a[i]) {
						visit[j] = 1;
						dp[i] = dp[j];
						flag = 1;
						break;
					}
				}
				if (!flag) dp[i] = ++cnt;
			}
		}
		printf("%d\n", cnt);
		for (int i = 0; i < a.size(); i++) printf("%d ", dp[i]);
		printf("\n");
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
const int maxn = 2e5 + 10;
string a;
int dp[maxn];//dp 表示的是对应的坐标值
int visit[maxn];
int main() {
	int t;
	scanf("%d", &t);
	while (t--) {
		int n;
		for (int i = 0; i < maxn; i++) dp[i] = 1;
		memset(visit, 0, sizeof(visit));
		cin >> n >> a;
		int cnt = 1;
		for (int i = 1; i < a.size(); i++) {
			if (a[i] != a[i - 1]) {
				visit[i - 1] = 1;
				visit[i] = 1;
				dp[i] = dp[i - 1];
			}
			else {
				int flag = 0;
				for (int j = 0; j < i; j++) {
					if (!visit[j] && a[j] != a[i]) {
						visit[j] = 1;
						dp[i] = dp[j];
						flag = 1;
						break;
					}
				}
				if (!flag) dp[i] = ++cnt;
			}
		}
		printf("%d\n", cnt);
		for (int i = 0; i < a.size(); i++) printf(" %d ", dp[i]);
		printf("\n");
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;

const int maxn = 2e5 + 10;
string a;
int dp[maxn];//dp 表示的是对应的坐标值
int visit[maxn];
int main() {
	int t;
	scanf("%d", &t);
	while (t--) {
		int n;
		for (int i = 0; i < maxn; i++) dp[i] = 1;
		memset(visit, 0, sizeof(visit));
		cin >> n >> a;
		int cnt = 1;
		if (a[0] != a[1]) visit[0] = 1,visit[1]=1,dp[1]=1,dp[0]=1;
		for (int i = 1; i < a.size(); i++) {
			if (a[i] != a[i - 1]) {
				visit[i] = 1;
				dp[i] = dp[i - 1];
			}
			else {
				int flag = 0;
				for (int j = 0; j < i; j++) {
					if (!visit[j] && a[j] != a[i]) {
						visit[j] = 1;
						dp[i] = dp[j];
						flag = 1;
						break;
					}
				}
				if (!flag) dp[i] = ++cnt;
			}
		}
		printf("%d\n", cnt);
		for (int i = 0; i < a.size(); i++) printf("%d ", dp[i]);
		printf("\n");
	}
	return 0;
}


#include<set>
#include<map>
#include<ctime>
#include<queue>
#include<stack>
#include<vector>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<algorithm>
#define LL long long
#define rint register int
using namespace std;
const int N=2e5+5;
int a[N];
char c[N];
int T,n;
struct DSU
{
	int par[N];
	int Find(int x)
	{
		if(x==par[x]) return x;
		else return par[x]=Find(par[x]);
	}
	inline void reset(int n)
	{
		for(int i=1;i<=n+4;i++)
			par[i]=i;
		return;
	}
}b0,b1;
int d[N];
void draw(int now,int col)
{
	if(now>n) return;
	d[now]=col;
	if(a[now]==0) {
		b0.par[now]=b0.Find(now+1);
		draw(b1.Find(now),col);
	}
	else {
		b1.par[now]=b1.Find(now+1);
		draw(b0.Find(now),col);
	}
	return;
}
int main()
{
//	freopen("1.in","r",stdin);
	int i;
	int ans;
	scanf("%d",&T);
	while(T--) {
		ans=0;
		scanf("%d",&n);
		fill(d,d+n+2,0);
		scanf("%s",c+1);
		for(i=1;i<=n;i++)
			a[i]=c[i]-'0';
		b0.reset(n); b1.reset(n);
		for(i=n;i>=1;i--) {
			if(a[i]==1) b1.par[i]=i,b0.par[i]=b0.par[i+1];
			else b1.par[i]=b1.par[i+1],b0.par[i]=i;
		}
		for(i=1;i<=n;i++) {
			if(d[i]>0) continue;
			d[i]=++ans;
			draw(i,ans);
		}
		printf("%d\n",ans);
		for(i=1;i<=n;i++)
			printf("%d ",d[i]);
		printf("\n");
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<vector>
using namespace std;
const int maxn = 2e5 + 10;
int t, n;
char s[maxn];
void solve() {
	scanf("%d", &t);
	while (t--) {
		scanf("%d", &n);
		scanf("%s", s);
		vector<int> ans(n);
		vector<int> pos0, pos1;//用pos0来存以0结尾的前缀，用pos1来存以1结尾的前缀
		for (int i = 0; i < n; ++i)
		{
			int res = pos0.size() + pos1.size();//找到当前的位置
			if (s[i] == '0') {//读到0，去找以1结尾的
				if (pos1.empty()) pos0.push_back(res);//没有以1为结尾的串才自立门户
				else {
					res = pos1.back();
					pos1.pop_back();//找到以1为结尾的最后组号
					pos0.push_back(res);//加入了之后就以0结尾了，所以压入以0结尾的容器
				}
			}
			else {//读到1，去找以0结尾的
				if (pos0.empty()) pos1.push_back(res);//没有以0为结尾的串才自立门户
				else {
					res = pos0.back();
					pos0.pop_back();//找到以0为结尾的最后组号
					pos1.push_back(res);//加入了之后就以1结尾了，所以压入以1结尾的容器
				}
			}
			ans[i] = res;//每轮记录一次
		}
		printf("%lld\n", pos0.size() + pos1.size());
		for (int it : ans) printf("%d ", it + 1);
		printf("\n");
	}
}

int main()
{
	solve();
	return 0;
}


#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
using namespace std;
const int maxn = 2e5 + 10;
string a;
int dp[maxn];//dp 表示的是对应的坐标值
int visit[maxn];
int main() {
	int t;
	scanf("%d", &t);
	while (t--) {
		int n;
		for (int i = 0; i < maxn; i++) dp[i] = 1;
		memset(visit, 0, sizeof(visit));
		cin >> n >> a;
		int cnt = 1;
		for (int i = 1; i < a.size(); i++) {
			if (a[i] != a[i - 1]) {
				visit[i - 1] = 1;
				visit[i] = 1;
				dp[i] = dp[i - 1];
			}
			else {
				int flag = 0;
				for (int j = 0; j < i; j++) {
					if (!visit[j] && a[j] != a[i]) {
						visit[j] = 1;
						dp[i] = dp[j];
						flag = 1;
						break;
					}
				}
				if (!flag) dp[i] = ++cnt;
			}
		}
		printf("%d\n", cnt);
		for (int i = 0; i < a.size(); i++) printf(" %d ", dp[i]);
		printf("\n");
	}
	return 0;
}


#include <bits/stdc++.h>
typedef long long int ll;
using namespace std;

int main() {
	int t;
	cin>>t;
	while(t--){
	    int n;
	    cin>>n;
	    string s;
	    cin>>s;
	    vector<int> map(2,0);
	    int mx = 1;
	    vector<int> ans(n,0);
	    for(int i=0;i<n;i++){
	        if(s[i]=='0'){
	            if(map[1]>0){
	                ans[i] = map[1];
	                map[1]--;
	                map[0]++;
	            }
	            else{
	                map[0]++;
	                ans[i] = map[0];
	            }
	        }
	        if(s[i]=='1'){
	            if(map[0]>0){
	                ans[i] = map[0];
	                map[0]--;
	                map[1]++;
	            }
	            else{
	                map[1]++;
	                ans[i] = map[1];
	            }
	        }
	        mx = max(mx,max(map[0],map[1]));
	    }
	    cout<<mx<<'\n';
	    for(int i=0;i<n;i++){
	        if(i==n-1){
	           cout<<ans[i];
	        }
	        else
	        cout<<ans[i]<<' ';
	    }
	    cout<<'\n';
	}
	return 0;
}


#include <bits/stdc++.h>
typedef long long int ll;
using namespace std;

int main() {
	int t;
	cin>>t;
	while(t--){
	    int n;
	    cin>>n;
	    string s;
	    cin>>s;
	    vector<ll> map(2,0);
	    ll mx = 1;
	    vector<ll> ans(n,0);
	    for(int i=0;i<n;i++){
	        if(s[i]=='0'){
	            if(map[1]>0){
	                ans[i] = map[1];
	                map[1]--;
	                map[0]++;
	            }
	            else{
	                map[0]++;
	                ans[i] = map[0];
	            }
	        }
	        if(s[i]=='1'){
	            if(map[0]>0){
	                ans[i] = map[0];
	                map[0]--;
	                map[1]++;
	            }
	            else{
	                map[1]++;
	                ans[i] = map[1];
	            }
	        }
	        mx = max(mx,map[0]+map[1]);
	    }
	    cout<<mx<<'\n';
	    for(int i=0;i<n;i++){
	        if(i==n-1){
	           cout<<ans[i];
	        }
	        else
	        cout<<ans[i]<<' ';
	    }
	    cout<<'\n';
	}
	return 0;
}


#include <bits/stdc++.h>
typedef long long int ll;
using namespace std;

int main() {
	int t;
	cin>>t;
	while(t--){
	    int n;
	    cin>>n;
	    string s;
	    cin>>s;
	    vector<int> map(2,0);
	    int mx = 1;
	    vector<int> ans(n,0);
	    for(int i=0;i<n;i++){
	        if(s[i]=='0'){
	            if(map[1]>0){
	                ans[i] = map[1];
	                map[1]--;
	                map[0]++;
	            }
	            else{
	                map[0]++;
	                ans[i] = map[0];
	            }
	        }
	        if(s[i]=='1'){
	            if(map[0]>0){
	                ans[i] = map[0];
	                map[0]--;
	                map[1]++;
	            }
	            else{
	                map[1]++;
	                ans[i] = map[1];
	            }
	        }
	        mx = max(mx,map[0]+map[1]);
	    }
	    cout<<mx<<'\n';
	    for(int i=0;i<n;i++){
	        if(i==n-1){
	           cout<<ans[i];
	        }
	        else
	        cout<<ans[i]<<' ';
	    }
	    cout<<'\n';
	}
	return 0;
}


#include <bits/stdc++.h>
typedef long long int ll;
using namespace std;

int main() {
	int t;
	cin>>t;
	while(t--){
	    int n;
	    cin>>n;
	    string s;
	    cin>>s;
	    vector<vector<ll>> map(2);
	    ll mx = 0;
	    vector<ll> ans(n,0);
	    for(int i=0;i<n;i++){
	        if(s[i]=='0'){
	            if(map[1].size()>0){
	                ans[i] = map[1].back();
	                ll x = map[1].back();
	                map[1].pop_back();
	                map[0].push_back(x);
	            }
	            else{
	                mx++;
	                ans[i] = mx;
	                map[0].push_back(mx);
	            }
	        }
	        if(s[i]=='1'){
	            if(map[0].size()>0){
	                ans[i] = map[0].back();
	                ll x = map[0].back();
	                map[0].pop_back();
	                map[1].push_back(x);
	            }
	            else{
	                mx++;
	                ans[i] = mx;
	                map[1].push_back(mx);
	            }
	        }
	    }
	    cout<<mx<<'\n';
	    for(int i=0;i<n;i++){
	        if(i==n-1){
	           cout<<ans[i];
	        }
	        else
	        cout<<ans[i]<<' ';
	    }
	    cout<<'\n';
	}
	return 0;
}


#include <bits/stdc++.h>
typedef long long int ll;
using namespace std;

int main() {
	int t;
	cin>>t;
	while(t--){
	    int n;
	    cin>>n;
	    string s;
	    cin>>s;
	    vector<int> map(2,0);
	    int mx = 0;
	    vector<int> ans(n,0);
	    for(int i=0;i<n;i++){
	        if(s[i]=='0'){
	            if(map[1]>0){
	                ans[i] = map[1];
	                map[1]--;
	            }
	            else{
	                map[0]++;
	                ans[i] = map[0];
	            }
	        }
	        if(s[i]=='1'){
	            if(map[0]>0){
	                ans[i] = map[0];
	                map[0]--;
	            }
	            else{
	                map[1]++;
	                ans[i] = map[1];
	            }
	        }
	    }
	    cout<<mx<<'\n';
	    for(int i=0;i<n;i++){
	        if(i==n-1){
	           cout<<ans[i];
	        }
	        else
	        cout<<ans[i]<<' ';
	    }
	    cout<<'\n';
	}
	return 0;
}


#include <bits/stdc++.h>
typedef long long int ll;
using namespace std;

int main() {
	int t;
	cin>>t;
	while(t--){
	    int n;
	    cin>>n;
	    string s;
	    cin>>s;
	    vector<ll> map(2,0);
	    ll mx = 1;
	    vector<ll> ans(n,0);
	    for(int i=0;i<n;i++){
	        if(s[i]=='0'){
	            if(map[1]>0){
	                ans[i] = map[1]+map[0];
	                map[1]--;
	                map[0]++;
	            }
	            else{
	                map[0]++;
	                ans[i] = map[0]+map[1];
	            }
	        }
	        if(s[i]=='1'){
	            if(map[0]>0){
	                ans[i] = map[0]+map[1];
	                map[0]--;
	                map[1]++;
	            }
	            else{
	                map[1]++;
	                ans[i] = map[1]+map[0];
	            }
	        }
	        mx = max(mx,map[0]+map[1]);
	    }
	    cout<<mx<<'\n';
	    for(int i=0;i<n;i++){
	        if(i==n-1){
	           cout<<ans[i];
	        }
	        else
	        cout<<ans[i]<<' ';
	    }
	    cout<<'\n';
	}
	return 0;
}


#define _CRT_SECURE_NO_WARNINGS

#include <bits/stdc++.h>
using namespace std;

typedef long long       		ll;
typedef vector<int> 		   	vi;
typedef vector<pair<int,int> > 	vii;

#define Read            freopen("in.txt", "r", stdin)
#define Write           freopen("out.txt", "w", stdout)

#define oo              1e9
#define OO              1e18

#define clr(a)          memset(a,0,sizeof a)
#define all(v)          v.begin(),v.end()
#define sz(v)           (int) v.size()
#define rev(v)			reverse(all(v))

#define pb              push_back
#define fi              first
#define se              second
#define mp              make_pair
#define mt				make_tuple
#define elm(t,indx)		get<indx>(t)

#define lop(i,n)        for(int i=0;i<n;++i)
#define lop1(i,n)       for(int i=1;i<=n;++i)

#define sc	            scanf
#define pf				printf
#define pfn				printf("\n")

#define debug(args...)  {dbg,args; cerr << endl;}
struct debugger{
    template<typename T> debugger& operator , (const T& v){
        cerr<<v<<" ";
        return *this;
    }
} dbg;

ll gcd(ll a, ll b){ return((b == 0)?a:gcd(b,a%b));  }
ll lcm(ll a, ll b){ return (a*b)/gcd(a,b); }

ll n, l , r, Qr, Ql, w[100005], sum[100005];

int main(){
#ifndef ONLINE_JUDGE
	Read;
#endif

    sc("%I64d %I64d %I64d %I64d %I64d", &n, &l, &r, &Ql, &Qr);

    lop1(i,n){
        sc("%I64d", &w[i]);
        sum[i] = w[i];
    }

    sum[0] = 0;

    lop1(i,n)
        sum[i] += sum[i-1];

    ll ans = OO ;

    lop1(i,n){
        ll cur = r * (sum[n] - sum[i-1]) + l * (sum[i-1]);
        ll q = 0;

        if(i <= n/2)
            q = Qr * (n - i - (i -1));
        if((n & 1) && i > n/2 + 2)
            q = Ql * (i - (n - i + 2) -1);
        if(!(n & 1) && i > n/2 +1)
            q = Ql * (i - (n - i + 2) -1);

    /*
        if((i > n/2 + 2 && (n&1)))
            q = (Ql * (i - n/2 - 2));
        if((i > n/2 + 1 && !(n&1)))
            q = (Ql * (i - n/2 - 1));
        if((i <= n/2 && (n&1)))
            q = (Qr * n-i);
        if((i <= n/2 && !(n&1)))
            q = (Qr * (n/2 - i + 1));
*/

        //cout << i << " " << cur << " " << q << endl;
        cur += q;
        ans = min(ans, cur);
    }

    pf("%I64d\n", ans);

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS

#include <bits/stdc++.h>
using namespace std;

typedef long long       		ll;
typedef vector<int> 		   	vi;
typedef vector<pair<int,int> > 	vii;

#define Read            freopen("in.txt", "r", stdin)
#define Write           freopen("out.txt", "w", stdout)

#define oo              1e9
#define OO              1e18

#define clr(a)          memset(a,0,sizeof a)
#define all(v)          v.begin(),v.end()
#define sz(v)           (int) v.size()
#define rev(v)			reverse(all(v))

#define pb              push_back
#define fi              first
#define se              second
#define mp              make_pair
#define mt				make_tuple
#define elm(t,indx)		get<indx>(t)

#define lop(i,n)        for(int i=0;i<n;++i)
#define lop1(i,n)       for(int i=1;i<=n;++i)

#define sc	            scanf
#define pf				printf
#define pfn				printf("\n")

#define debug(args...)  {dbg,args; cerr << endl;}
struct debugger{
    template<typename T> debugger& operator , (const T& v){
        cerr<<v<<" ";
        return *this;
    }
} dbg;

ll gcd(ll a, ll b){ return((b == 0)?a:gcd(b,a%b));  }
ll lcm(ll a, ll b){ return (a*b)/gcd(a,b); }

ll n, l , r, Qr, Ql, w[100005], sum[100005];

int main(){
#ifndef ONLINE_JUDGE
	Read;
#endif

    sc("%I64d %I64d %I64d %I64d %I64d", &n, &l, &r, &Ql, &Qr);

    lop1(i,n){
        sc("%I64d", &w[i]);
        sum[i] = w[i];
    }

    sum[0] = 0;

    lop1(i,n)
        sum[i] += sum[i-1];

    ll ans = OO ;

    lop1(i,n){
        ll cur = r * (sum[n] - sum[i-1]) + l * (sum[i-1]);
        ll q = 0;

        if((i > n/2 + 2 && (n&1)))
            q = (Ql * (i-n/2-1)) ;
        if((i > n/2 && !(n&1)))
            q = (Ql * (i-n/2+1));
        if((i <= n/2 && (n&1)))
            q = (Qr * (n/2 - i + 1));
        if((i <= n/2 && !(n&1)))
            q = (Qr * (n/2 - i+1));

        cur += q;
        ans = min(ans, cur);
    }

    pf("%I64d\n", ans);

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS

#include <bits/stdc++.h>
using namespace std;

typedef long long       		ll;
typedef vector<int> 		   	vi;
typedef vector<pair<int,int> > 	vii;

#define Read            freopen("in.txt", "r", stdin)
#define Write           freopen("out.txt", "w", stdout)

#define oo              1e9
#define OO              1e18

#define clr(a)          memset(a,0,sizeof a)
#define all(v)          v.begin(),v.end()
#define sz(v)           (int) v.size()
#define rev(v)			reverse(all(v))

#define pb              push_back
#define fi              first
#define se              second
#define mp              make_pair
#define mt				make_tuple
#define elm(t,indx)		get<indx>(t)

#define lop(i,n)        for(int i=0;i<n;++i)
#define lop1(i,n)       for(int i=1;i<=n;++i)

#define sc	            scanf
#define pf				printf
#define pfn				printf("\n")

#define debug(args...)  {dbg,args; cerr << endl;}
struct debugger{
    template<typename T> debugger& operator , (const T& v){
        cerr<<v<<" ";
        return *this;
    }
} dbg;

ll gcd(ll a, ll b){ return((b == 0)?a:gcd(b,a%b));  }
ll lcm(ll a, ll b){ return (a*b)/gcd(a,b); }

ll n, l , r, Qr, Ql, w[100005], sum[100005];

int main(){
#ifndef ONLINE_JUDGE
	Read;
#endif

    sc("%I64d %I64d %I64d %I64d %I64d", &n, &l, &r, &Ql, &Qr);

    lop1(i,n){
        sc("%I64d", &w[i]);
        sum[i] = w[i];
    }

    sum[0] = 0;

    lop1(i,n)
        sum[i] += sum[i-1];

    ll ans = OO ;

    lop1(i,n){
        ll cur = r * (sum[n] - sum[i-1]) + l * (sum[i-1]);
        ll q = 0;

        if((i > n/2 + 2 && (n&1)))
            q = (Ql * (i-n/2-2)) ;
        if((i > n/2 + 1&& !(n&1)))
            q = (Ql * (i-n/2 -1));
        if((i <= n/2 && (n&1)))
            q = (Qr * (n/2 - i + 1));
        if((i <= n/2 && !(n&1)))
            q = (Qr * (n/2 - i + 1));

        //cout << i << " " << cur << " " << q << endl;
        cur += q;
        ans = min(ans, cur);
    }

    pf("%I64d\n", ans);

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS

#include <bits/stdc++.h>
using namespace std;

typedef long long       		ll;
typedef vector<int> 		   	vi;
typedef vector<pair<int,int> > 	vii;

#define Read            freopen("in.txt", "r", stdin)
#define Write           freopen("out.txt", "w", stdout)

#define oo              1e9
#define OO              1e18

#define clr(a)          memset(a,0,sizeof a)
#define all(v)          v.begin(),v.end()
#define sz(v)           (int) v.size()
#define rev(v)			reverse(all(v))

#define pb              push_back
#define fi              first
#define se              second
#define mp              make_pair
#define mt				make_tuple
#define elm(t,indx)		get<indx>(t)

#define lop(i,n)        for(int i=0;i<n;++i)
#define lop1(i,n)       for(int i=1;i<=n;++i)

#define sc	            scanf
#define pf				printf
#define pfn				printf("\n")

#define debug(args...)  {dbg,args; cerr << endl;}
struct debugger{
    template<typename T> debugger& operator , (const T& v){
        cerr<<v<<" ";
        return *this;
    }
} dbg;

ll gcd(ll a, ll b){ return((b == 0)?a:gcd(b,a%b));  }
ll lcm(ll a, ll b){ return (a*b)/gcd(a,b); }

ll n, l , r, Qr, Ql, w[100005], sum[100005];

int main(){
#ifndef ONLINE_JUDGE
	Read;
#endif

    sc("%I64d %I64d %I64d %I64d %I64d", &n, &l, &r, &Ql, &Qr);

    lop1(i,n){
        sc("%I64d", &w[i]);
        sum[i] = w[i];
    }

    sum[0] = 0;

    lop1(i,n)
        sum[i] += sum[i-1];

    ll ans = OO ;

    lop1(i,n){
        ll cur = r * (sum[n] - sum[i-1]) + l * (sum[i-1]);
        ll q = 0;

        if((i > n/2 + 2 && (n&1)))
            q = (Ql * (i-n/2-2)) ;
        if((i > n/2 + 1 && !(n&1)))
            q = (Ql * (i-n/2 -1));
        if((i <= n/2 && (n&1)))
            q = (Qr * (n/2 - i + 2));
        if((i <= n/2 && !(n&1)))
            q = (Qr * (n/2 - i + 1));

        //cout << i << " " << cur << " " << q << endl;
        cur += q;
        ans = min(ans, cur);
    }

    pf("%I64d\n", ans);

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS

#include <bits/stdc++.h>
using namespace std;

typedef long long       		ll;
typedef vector<int> 		   	vi;
typedef vector<pair<int,int> > 	vii;

#define Read            freopen("in.txt", "r", stdin)
#define Write           freopen("out.txt", "w", stdout)

#define oo              1e9
#define OO              1e18

#define clr(a)          memset(a,0,sizeof a)
#define all(v)          v.begin(),v.end()
#define sz(v)           (int) v.size()
#define rev(v)			reverse(all(v))

#define pb              push_back
#define fi              first
#define se              second
#define mp              make_pair
#define mt				make_tuple
#define elm(t,indx)		get<indx>(t)

#define lop(i,n)        for(int i=0;i<n;++i)
#define lop1(i,n)       for(int i=1;i<=n;++i)

#define sc	            scanf
#define pf				printf
#define pfn				printf("\n")

#define debug(args...)  {dbg,args; cerr << endl;}
struct debugger{
    template<typename T> debugger& operator , (const T& v){
        cerr<<v<<" ";
        return *this;
    }
} dbg;

ll gcd(ll a, ll b){ return((b == 0)?a:gcd(b,a%b));  }
ll lcm(ll a, ll b){ return (a*b)/gcd(a,b); }

ll n, l , r, Qr, Ql, w[100005], sum[100005];

int main(){
#ifndef ONLINE_JUDGE
	Read;
#endif

    sc("%I64d %I64d %I64d %I64d %I64d", &n, &l, &r, &Ql, &Qr);

    lop1(i,n){
        sc("%I64d", &w[i]);
        sum[i] = w[i];
    }

    sum[0] = 0;

    lop1(i,n)
        sum[i] += sum[i-1];

    ll ans = OO ;

    lop1(i,n){
        ll cur = r * (sum[n] - sum[i-1]) + l * (sum[i-1]);
        ll q = 0;

        if((i > n/2 + 2 && (n&1)))
            q = (Ql * (i-n/2-2)) ;
        if((i > n/2 && !(n&1)))
            q = (Ql * (i-n/2));
        if((i <= n/2 && (n&1)))
            q = (Qr * (n/2 - i + 1));
        if((i <= n/2 && !(n&1)))
            q = (Qr * (n/2 - i + 1));

        cur += q;
        ans = min(ans, cur);
    }

    pf("%I64d\n", ans);

	return 0;
}


#include<iostream>
#include<set>

using namespace std;

int main() {
    int n, l, r, ql, qr;
    cin>>n>>l>>r>>ql>>qr;
    int q[n];
    int totalr = 0;
    for(int i = 0; i < n; i++) {
        cin>>q[i];
        totalr += q[i];
    }

    int totall = 0;
    int sol = 1000000000;
    for(int i = 0; i < n; i++) {
        int aux = 0;
        aux += totalr*r;
        aux += totall*l;
        aux += max(0, i-(n-i)-1)*ql;
        aux += max(0, (n-i)-i-1)*qr;
        sol = min(sol, aux);
        totall += q[i];
        totalr -= q[i];
    }
    int aux = 0;
    aux += totalr*r;
    aux += totall*l;
    aux += (n-1)*ql;
    sol = min(sol, aux);

    cout<<sol<<endl;
}


#include<iostream>
#include<set>

using namespace std;

int main() {
    int n, l, r, ql, qr;
    cin>>n>>l>>r>>ql>>qr;
    int q[n];
    int totalr = 0;
    for(int i = 0; i < n; i++) {
        cin>>q[i];
        totalr += q[i];
    }

    int totall = 0;
    int sol = 1000000000;
    for(int i = 0; i < n; i++) {
        int aux = 0;
        aux += totalr*r;
        aux += totall*l;
        aux += max(0, i-(n-i)-1)*ql;
        aux += max(0, (n-i)-i-1)*qr;
        sol = min(sol, aux);
        totall += q[i];
        totalr -= q[i];
    }

    cout<<sol<<endl;
}


#include <bits/stdc++.h>

using namespace std;

#define trace(x) cerr << #x << ": " << x << " ";
#define tracen(x) cerr << #x << ": " << x << "\n";

typedef long long lolo;
typedef unsigned long long ulolo;
typedef pair<int, int> point;
#define fi first
#define se second

const int INF = 1e9 + 23;
const int MOD = 1e9 + 9;
const int MAXN = 1e5 + 100;

int arr[MAXN];
lolo cost[3][MAXN];
lolo cost_sum[MAXN];

int main()
{
	int n, el, r, ql, qr;
  cin >> n >> el >> r >> ql >> qr;
  cost[0][0] = cost[1][n + 1] = cost_sum[0] = cost_sum[n + 1] = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    cost[0][i] = cost[0][i - 1] + el * arr[i];
  }
  for (int i = n; i >= 1; --i) {
    cost[1][i] = cost[1][i + 1] + r * arr[i];
    cost_sum[i] = cost[0][i] + cost[1][i + 1];
  }
  int lefty = n / 2 - 1;
  for (int i = lefty, m = qr; i >= 0; --i, m += qr) {
    cost_sum[i] += m;
  }
  int righty = (n + 1) / 2 + 1; if (!(n & 1)) ++righty;
  for (int i = righty, m = ql; i <= n; ++i, m += ql) {
    cost_sum[i] += m;
  }
  lolo ans = INF;
  for (int i = 1; i <= n; ++i) ans = min(ans, cost_sum[i]);
  cout << ans << "\n";
  return 0;
}

// g++ -W -Wall -Wextra -pedantic -std=c++0x -o p main.cpp


#include <bits/stdc++.h>

using namespace std;

#define trace(x) cerr << #x << ": " << x << " ";
#define tracen(x) cerr << #x << ": " << x << "\n";

typedef long long lolo;
typedef unsigned long long ulolo;
typedef pair<int, int> point;
#define fi first
#define se second

const int INF = 1e9 + 23;
const int MOD = 1e9 + 9;
const int MAXN = 1e5 + 100;

int arr[MAXN];

int main()
{
	int n, el, r, ql, qr;
  cin >> n >> el >> r >> ql >> qr;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    arr[i] += arr[i - 1];
  }
  lolo ans = INF;
  for (int i = 0; i <= n; ++i) {
    lolo cur_cost = arr[i] * el + (arr[n] - arr[i]) * r;
    //trace(i); trace(arr[i]); tracen(cur_cost);
    if (i < n - i) cur_cost += (n - 2*i - 1) * qr;
    if (n - i < i) cur_cost += (2*i - n - 1) * ql;
    //tracen(cur_cost);
    ans = min(ans, cur_cost);
  }
  cout << ans << "\n";
  return 0;
}

// g++ -W -Wall -Wextra -pedantic -std=c++0x -o p main.cpp


#include <bits/stdc++.h>

using namespace std;

#define trace(x) cerr << #x << ": " << x << " ";
#define tracen(x) cerr << #x << ": " << x << "\n";

typedef long long lolo;
typedef unsigned long long ulolo;
typedef pair<int, int> point;
#define fi first
#define se second

const int INF = 1e9 + 23;
const int MOD = 1e9 + 9;
const int MAXN = 1e5 + 100;

int arr[MAXN];
lolo cost[3][MAXN];
lolo cost_sum[MAXN];

int main()
{
	int n, el, r, ql, qr;
  cin >> n >> el >> r >> ql >> qr;
  cost[0][0] = cost[1][n + 1] = cost_sum[0] = cost_sum[n + 1] = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    cost[0][i] = cost[0][i - 1] + el * arr[i];
  }
  for (int i = n; i >= 1; --i) {
    cost[1][i] = cost[1][i + 1] + r * arr[i];
    cost_sum[i] = cost[0][i] + cost[1][i + 1];
  }
  int lefty = n / 2 - 1;
  for (int i = lefty, m = qr; i >= 0; --i, m += qr) {
    cost_sum[i] += m;
  }
  int righty = (n + 1) / 2 + 1;
  for (int i = righty, m = ql; i <= n; ++i, m += ql) {
    cost_sum[i] += m;
  }
  lolo ans = INF;
  for (int i = 1; i <= n; ++i) ans = min(ans, cost_sum[i]);
  cout << ans << "\n";
  return 0;
}

// g++ -W -Wall -Wextra -pedantic -std=c++0x -o p main.cpp


#include <bits/stdc++.h>

using namespace std;

#define trace(x) cerr << #x << ": " << x << " ";
#define tracen(x) cerr << #x << ": " << x << "\n";

typedef long long lolo;
typedef unsigned long long ulolo;
typedef pair<int, int> point;
#define fi first
#define se second

const int INF = 1e9 + 23;
const int MOD = 1e9 + 9;
const int MAXN = 1e5 + 100;

int arr[MAXN];
lolo cost[3][MAXN];
lolo cost_sum[MAXN];

int main()
{
	int n, el, r, ql, qr;
  cin >> n >> el >> r >> ql >> qr;
  cost[0][0] = cost[1][n + 1] = cost_sum[0] = cost_sum[n + 1] = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    cost[0][i] = cost[0][i - 1] + el * arr[i];
  }
  for (int i = n; i >= 0; --i) {
    cost[1][i] = cost[1][i + 1] + r * arr[i];
    cost_sum[i] = cost[0][i] + cost[1][i + 1];
  }
  int lefty = (n - 1) * qr;
  for (int i = 0; lefty > 0; ++i, lefty -= 2*qr) {
    cost_sum[i] += lefty;
  }
  int righty = (n - 1) * ql;
  for (int i = n; righty > 0; --i, righty -= 2*ql) {
    cost_sum[i] += righty;
  }
  lolo ans = INF;
  for (int i = 0; i <= n; ++i) {
    //trace(i); tracen(cost_sum[i]);
    ans = min(ans, cost_sum[i]);
  }
  cout << ans << "\n";
  return 0;
}

// g++ -W -Wall -Wextra -pedantic -std=c++0x -o p main.cpp


#include <bits/stdc++.h>

using namespace std;

#define trace(x) cerr << #x << ": " << x << " ";
#define tracen(x) cerr << #x << ": " << x << "\n";

typedef long long lolo;
typedef unsigned long long ulolo;
typedef pair<int, int> point;
#define fi first
#define se second

const int INF = 1e9 + 23;
const int MOD = 1e9 + 9;
const int MAXN = 1e5 + 100;

int arr[MAXN];
lolo cost[3][MAXN];
lolo cost_sum[MAXN];

int main()
{
	int n, el, r, ql, qr;
  cin >> n >> el >> r >> ql >> qr;
  cost[0][0] = cost[1][n + 1] = cost_sum[0] = cost_sum[n + 1] = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> arr[i];
    cost[0][i] = cost[0][i - 1] + el * arr[i];
  }
  for (int i = n; i >= 0; --i) {
    cost[1][i] = cost[1][i + 1] + r * arr[i];
    cost_sum[i] = cost[0][i] + cost[1][i + 1];
  }
  int lefty = n / 2 - 1;
  for (int i = lefty, m = qr; i >= 0; --i, m += qr) {
    cost_sum[i] += m;
  }
  int righty = (n + 1) / 2 + 1;
  for (int i = righty, m = ql; i <= n; ++i, m += ql) {
    cost_sum[i] += m;
  }
  lolo ans = INF;
  for (int i = 0; i <= n; ++i) ans = min(ans, cost_sum[i]);
  cout << ans << "\n";
  return 0;
}

// g++ -W -Wall -Wextra -pedantic -std=c++0x -o p main.cpp


#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <deque>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;

template<class T>
ostream& operator<< (ostream& fout, const vector<T>& vec) {
  for (const auto& el : vec) {
    fout << el << ' ';
  }
  return fout;
}

template <class T>
istream& operator>> (istream& fin, vector<T>& vec) {
  for (size_t i = 0; i < vec.size(); ++i) {
    cin >> vec[i];
  }
  return fin;
}

int Solve() {
  int n, l, r, Ql, Qr;
  cin >> n >> l >> r >> Ql >> Qr;
  vector<int64_t> p(n + 1);
  vector<int> in(n);
  for (int i = 0; i < n; ++i) {
    int buf;
    cin >> buf;
    in[i] = buf;
    p[i + 1] = buf + p[i];
  }

  int64_t mn = 1e18;;
  for (int i = 0; i < n; ++i) {
    int64_t res = 0;
    res += p[i] * l + (p[n] - p[i]) * r;
    if (i < n - i) {
      res += (n - 2 * i - 1) * Qr;
    } else if (i > n - i) {
      res += (2 * i - n - 1) * Ql;
    }
    mn = min(res, mn);
  }
  cout << mn << '\n';

  return 0;
}

int main() {
#ifndef LOCAL
  //freopen("input.txt", "rt", stdin);
  //freopen("output.txt", "wt", stdout);
#endif
#ifdef LOCAL
  //freopen("input.txt", "rt", stdin);
#endif

  ios_base::sync_with_stdio(0);
  cin.tie(0);
  Solve();
  return 0;
}


#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <deque>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;

template<class T>
ostream& operator<< (ostream& fout, const vector<T>& vec) {
  for (const auto& el : vec) {
    fout << el << ' ';
  }
  return fout;
}

template <class T>
istream& operator>> (istream& fin, vector<T>& vec) {
  for (size_t i = 0; i < vec.size(); ++i) {
    cin >> vec[i];
  }
  return fin;
}

int Solve() {
  int n, l, r, Ql, Qr;
  cin >> n >> l >> r >> Ql >> Qr;
  vector<int64_t> p(n + 1);
  vector<int> in(n);
  for (int i = 0; i < n; ++i) {
    int buf;
    cin >> buf;
    in[i] = buf;
    p[i + 1] = buf + p[i];
  }

  int64_t mn = 1e18;;
  for (int i = 0; i <= n; ++i) {
    int64_t res = 0;
    res += p[i] * l + (p[n] - p[i]) * r;
    if (i < n - i) {
      res += (n - 2 * i - 1) * Qr;
    } else if (i > n - i) {
      res += (2 * i - n - 1) * Ql;
    }
    mn = min(res, mn);
  }
  cout << mn << '\n';

  return 0;
}

int main() {
#ifndef LOCAL
  //freopen("input.txt", "rt", stdin);
  //freopen("output.txt", "wt", stdout);
#endif
#ifdef LOCAL
  //freopen("input.txt", "rt", stdin);
#endif

  ios_base::sync_with_stdio(0);
  cin.tie(0);
  Solve();
  return 0;
}


#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <deque>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;

template<class T>
ostream& operator<< (ostream& fout, const vector<T>& vec) {
  for (const auto& el : vec) {
    fout << el << ' ';
  }
  return fout;
}

template <class T>
istream& operator>> (istream& fin, vector<T>& vec) {
  for (size_t i = 0; i < vec.size(); ++i) {
    cin >> vec[i];
  }
  return fin;
}

int Solve() {
  int n, l, r, Ql, Qr;
  cin >> n >> l >> r >> Ql >> Qr;
  vector<int64_t> p(n + 1);
  vector<int> in(n);
  for (int i = 0; i < n; ++i) {
    int buf;
    cin >> buf;
    in[i] = buf;
    p[i + 1] = buf + p[i];
  }

  int64_t mn = 1e18;;
  for (int i = 0; i <= n; ++i) {
    int64_t res = 0;
    res += p[i] * l + (p[n] - p[i]) * r;
    if (i < n - i) {
      res += (n - i - i - 1) * Qr;
    } else if (i > n - i) {
      res += (i - n - i - 1) * Ql;
    }
    mn = min(res, mn);
  }
  cout << mn << '\n';

  return 0;
}

int main() {
#ifndef LOCAL
  //freopen("input.txt", "rt", stdin);
  //freopen("output.txt", "wt", stdout);
#endif
#ifdef LOCAL
  //freopen("input.txt", "rt", stdin);
#endif

  ios_base::sync_with_stdio(0);
  cin.tie(0);
  Solve();
  return 0;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], sl[N], sr[N], n, l, r, ql, qr, qs, qb, s, b;
int main()
{
    cin >> n >> l >> r >> ql >> qr;
    if(l<=r)
        qs=ql, qb=qr, s=l, b=r;
    else
        qs=qr, qb=ql, s=r, b=l;
    for(int i =0; i<n; ++i)
        scanf("%d", a+i);
    bool odd = n%2;
    for(int i = n/2-1; i>-1; --i)
        sl[i]+=sl[i+1]+a[i];
    for(int i=n/2; i<n; i++)
        sr[n-i-1]+=a[i]+sr[n-i];
    int sum = 0, ans = 1e9;
    for(int i=0; i<n/2; ++i)
    {
        // cout<<sl[i]<<endl<<sr[i]<<endl;
        ans = min(ans, sum+(sl[i]+sr[i]+odd*a[n/2])*s+qs*(n-(i)*2-1*(!odd))), sum+=l*a[i]+r*a[n-i-1];
//cout<<ans<<endl;
    }
    ans = min(ans, sum+odd*a[n/2]*s);
    cout << ans;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], sl[N], sr[N], n, l, r, ql, qr, qs, s;
int main()
{
    cin >> n >> l >> r >> ql >> qr;
    if(l<=r)
        qs=ql, s=l;
    else
        qs=qr, s=r;
    for(int i =0; i<n; ++i)
        scanf("%d", a+i);
    bool odd = n%2;
    for(int i = n/2-1; i>-1; --i)
        sl[i]+=sl[i+1]+a[i];
    for(int i=n/2+1*odd; i<n; i++)
        sr[n-i-1]+=a[i]+sr[n-i];
    int sum = 0, ans;
    for(int i=0; i<n/2; ++i){
        if(!i)
            ans = sum+(sl[i]+sr[i]+odd*a[n/2])*s+qs*(n-(i)*2-1*(!odd));
        else
            ans = min(ans, sum+(sl[i]+sr[i]+odd*a[n/2])*s+qs*(n-(i)*2-1*(!odd)));
            sum+=l*a[i]+r*a[n-i-1];
    }
    ans = min(ans, sum+odd*a[n/2]*s);
    cout << ans;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], sl[N], n, l, r, ql, qr;
int main()
{
    cin >> n >> l >> r >> ql >> qr;

    for(int i =1; i<=n; ++i)
        scanf("%d", a+i);

    for(int i=1; i<=n; i++)
        sl[i]+=a[i]+sl[i-1];
    int ans=2e9;
    int s=sl[n];

    for(int i=0;i<=n; ++i){
        int sum = (s-sl[i])*r + (sl[i])*l;

        if(i>(n+1)/2)
            sum+=(i-(n-i)-1)*ql;
       if(n-i>(n+1)/2)
            sum+=(n-2*i-1)*qr;
        ans = min(ans, sum);
    }

    cout << ans;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], sl[N], n, l, r, ql, qr;
int main()
{
    cin >> n >> l >> r >> ql >> qr;

    for(int i =1; i<=n; ++i)
        scanf("%d", a+i);

    for(int i=1; i<=n; i++)
        sl[i]+=a[i]+sl[i-1];
    int ans=2e9;
    int s=sl[n];
    bool odd=n%2;
    for(int i=0;i<=n; ++i){
        int sum = (s-sl[i])*r + (sl[i])*l;

        if(i>(n+1)/2)
            sum+=(i-(n+1)/2+odd)*ql;
       if(n-i>(n+1)/2)
            sum+=(n-i-(n+1)/2+odd)*qr;
        ans = min(ans, sum);
    }

    cout << ans;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], sl[N], sr[N], n, l, r, ql, qr, qs, qb, s, b;
int main()
{
    cin >> n >> l >> r >> ql >> qr;
    if(l<=r)
        qs=ql, qb=qr, s=l, b=r;
    else
        qs=qr, qb=ql, s=r, b=l;
    for(int i =0; i<n; ++i)
        scanf("%d", a+i);
    bool odd = n%2;
    for(int i = n/2-1; i>-1; --i)
        sl[i]+=sl[i+1]+a[i];
    for(int i=n/2+1*odd; i<n; i++)
        sr[n-i-1]+=a[i]+sr[n-i];
    int sum = 0, ans = 1e9;
    for(int i=0; i<n/2; ++i)

        ans = min(ans, sum+(sl[i]+sr[i]+odd*a[n/2])*s+qs*(n-(i)*2-1*(!odd))), sum+=l*a[i]+r*a[n-i-1];

    ans = min(ans, sum+odd*a[n/2]*s);
    cout << ans;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], sl[N], n, l, r, ql, qr;
int main()
{
    cin >> n >> l >> r >> ql >> qr;

    for(int i =1; i<=n; ++i)
        scanf("%d", a+i);

    for(int i=1; i<=n; i++)
        sl[i]+=a[i]+sl[i-1];
    int ans=2e9;
    int s=sl[n];
    for(int i=0;i<=n; ++i){
        int sum = (s-sl[i])*r + (sl[i])*l;

        if(i>(n+1)/2)
            sum+=(i-(n+1)/2)*ql;
       if(n-i>(n+1)/2)
            sum+=(n-i-(n+1)/2)*qr;
        ans = min(ans, sum);
    }

    cout << ans;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], sl[N], n, l, r, ql, qr;
int main()
{
    cin >> n >> l >> r >> ql >> qr;

    for(int i =1; i<=n; ++i)
        scanf("%d", a+i);

    for(int i=1; i<=n; i++)
        sl[i]+=a[i]+sl[i-1];
    int ans=2e9;
    int s=sl[n];
    for(int i=0;i<=n; ++i){
        int sum = (s-sl[i])*r + (sl[i])*l;
      //  cout <<s-sl[i]<<" "<<sl[i]<<endl;
        if(i>n/2)
            sum+=(i-n/2)*ql;
        else
            sum+=(n/2-i)*qr;
        ans = min(ans, sum);
    }

    cout << ans;
}


// https://codeforces.com/contest/354/problem/A

#include <bits/stdc++.h>
using namespace std;
int main() {
    #define int long long
    ios::sync_with_stdio(0);
    cin.sync_with_stdio(0);
    cin.tie(0);
    #define endl '\n'

    int n, l, r, ql, qr;
    cin >> n >> l >> r >> ql >> qr;

    int a[n+1];
    for(int i = 1; i <= n; i++) cin >> a[i];
    a[0] = 0;

    int psa[n+1];
    psa[0] = 0;
    for(int i = 1; i <= n; i++) {
        psa[i] = a[i];
        psa[i] += psa[i-1];
    }

    int ans = INT_MAX;
    for(int i = 1; i <= n; i++) {
        int tl = i;
        int tr = n-i;

        int cl = psa[i] * l;
        int cr = (psa[n] - psa[i]) * r;
        int pen;
        if(tl > tr) {
            pen = max(0, (tl-tr)-1)*ql;
        } else {
            pen = max(0, (tr-tl)-1)*qr;
        }

        ans = min(ans, cl + cr + pen);
    }

    cout << ans << endl;
}


// https://codeforces.com/contest/354/problem/A

#include <bits/stdc++.h>
using namespace std;
int main() {
    #define int long long
    ios::sync_with_stdio(0);
    cin.sync_with_stdio(0);
    cin.tie(0);
    #define endl '\n'

    int n, l, r, ql, qr;
    cin >> n >> l >> r >> ql >> qr;

    int a[n+1];
    for(int i = 1; i <= n; i++) cin >> a[i];
    a[0] = 0;

    int psa[n+1];
    psa[0] = 0;
    for(int i = 1; i <= n; i++) {
        psa[i] = a[i];
        psa[i] += psa[i-1];
    }

    int ans = INT_MAX;
    for(int i = 0; i <= n; i++) {
        int tl = i;
        int tr = n-i;

        int cl = psa[i] * l;
        int cr = (psa[n] - psa[i]) * r;
        int pen;
        if(tl > tr) {
            pen = max(0LL, (tl-tr)-1)*ql;
        } else {
            pen = max(0LL, (tr-tl)-1)*qr;
        }

        ans = min(ans, cl + cr + pen);
    }

    cout << ans << endl;
}


// https://codeforces.com/contest/354/problem/A

#include <bits/stdc++.h>
using namespace std;
int main() {
    #define int long long
    ios::sync_with_stdio(0);
    cin.sync_with_stdio(0);
    cin.tie(0);
    #define endl '\n'

    int n, l, r, ql, qr;
    cin >> n >> l >> r >> ql >> qr;

    int a[n+1];
    for(int i = 1; i <= n; i++) cin >> a[i];
    a[0] = 0;

    int psa[n+1];
    psa[0] = 0;
    for(int i = 1; i <= n; i++) {
        psa[i] = a[i];
        psa[i] += psa[i-1];
    }

    int ans = INT_MAX;
    for(int i = 1; i <= n; i++) {
        int tl = i;
        int tr = n-i;

        int cl = psa[i] * l;
        int cr = (psa[n] - psa[i]) * r;
        int pen;
        if(tl > tr) {
            pen = max(0LL, (tl-tr)-1)*ql;
        } else {
            pen = max(0LL, (tr-tl)-1)*qr;
        }

        ans = min(ans, cl + cr + pen);
    }

    cout << ans << endl;
}


#include <iostream>

using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    long long n,l,r,ql,qr;
    cin >> n >> l >> r >> ql >> qr;

    long long T[n];
    long long sumar = 0;

    for (int i=0; i<n; i++) {
        cin >> T[i];
        sumar += T[i];
    }

    //cout << n << " " << l << " " << r << " " << ql << " " << qr << " " << sumar << endl;
    long long sumal = 0;
    long long mini = sumar*r+(n-1)*qr;
    for (int i=1; i<=n; i++){
        sumal += T[i-1];
        sumar -= T[i-1];
        long long koszt = sumal*l + sumar*r;
        if (i > n-i+1) koszt += (i - 2*(n-i) - 1)*ql;
        if (i < n-1-i) koszt += (n - 2*i - 1)*qr;
        if (koszt < mini) mini = koszt;
        //cout << "i: " << i << " , koszt: " << koszt << " , sumal: " << sumal << " , sumar: " << sumar << endl;
    }

    cout << mini;

}


#include <iostream>

using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    long long n,l,r,ql,qr;
    cin >> n >> l >> r >> ql >> qr;

    long long T[n];
    long long sumar = 0;

    for (int i=0; i<n; i++) {
        cin >> T[i];
        sumar += T[i];
    }

    //cout << n << " " << l << " " << r << " " << ql << " " << qr << " " << sumar << endl;
    long long sumal = 0;
    long long mini = sumar*r+(n-1)*qr;
    for (int i=1; i<=n; i++){
        sumal += T[i-1];
        sumar -= T[i-1];
        long long koszt = sumal*l + sumar*r;
        if (i > (n+1)/2) koszt += (i - 2*(n-i) - 1)*ql;
        if (i < n/2) koszt += (n - 2*i - 1)*qr;
        if (koszt < mini) mini = koszt;
        //cout << "i: " << i << " , koszt: " << koszt << " , sumal: " << sumal << " , sumar: " << sumar << endl;
    }

    cout << mini;

}


#include <iostream>

using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    long long n,l,r,ql,qr;
    cin >> n >> l >> r >> ql >> qr;

    long long T[n];
    long long sumar = 0;

    for (int i=0; i<n; i++) {
        cin >> T[i];
        sumar += T[i];
    }

    //cout << n << " " << l << " " << r << " " << ql << " " << qr << " " << sumar << endl;
    long long sumal = 0;
    long long mini = sumar*r+(n-1)*qr;
    for (int i=1; i<=n; i++){
        sumal += T[i-1];
        sumar -= T[i-1];
        long long koszt = sumal*l + sumar*r;
        if (i > n-i+1) koszt += (n - 2*(n-i) - 1)*ql;
        if (i < n-1-i) koszt += (n - 2*i - 1)*qr;
        if (koszt < mini) mini = koszt;
        //cout << "i: " << i << " , koszt: " << koszt << " , sumal: " << sumal << " , sumar: " << sumar << endl;
    }

    cout << mini;

}


#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <limits.h>
#include <math.h>
#include <vector>
#include <unordered_map>
#include <map>
#include <bitset>
#include <sstream>
#include <set>
#include <stack>
#include <queue>
using namespace std;
#define ll long long
#define vi vector<int>
#define pii pair<int,int>

ll n, l, r, p, q;
ll sum[100005];

int main()
{
	scanf("%I64d%I64d%I64d%I64d%I64d", &n, &l, &r, &p, &q);
	ll w;
	for (int i = 1; i <= n; i++){
		scanf("%I64d", &w);
		sum[i] = w + sum[i - 1];
	}
	ll ans = 1e18;
	for (int k = 0; k <= n; k++){
		ll tmp = l*(sum[k]) + r*(sum[n] - sum[k]);
		tmp = tmp + (k <= n / 2 ? ((n - 2 * k) / 2)*q : ((2 * k - n) / 2)*p);
		ans = min(ans, tmp);
	}
	printf("%I64d\n", ans);
//	system("pause");
	return 0;
}


#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <limits.h>
#include <math.h>
#include <vector>
#include <unordered_map>
#include <map>
#include <bitset>
#include <sstream>
#include <set>
#include <stack>
#include <queue>
using namespace std;
#define ll long long
#define vi vector<int>
#define pii pair<int,int>

ll n, l, r, p, q;
ll sum[100005];

int main()
{
	scanf("%I64d%I64d%I64d%I64d%I64d", &n, &l, &r, &p, &q);
	ll w;
	for (int i = 1; i <= n; i++){
		scanf("%I64d", &w);
		sum[i] = w + sum[i - 1];
	}
	ll ans = 1e18;
	for (int k = 0; k <= n; k++){
		ll tmp = l*(sum[k]) + r*(sum[n] - sum[k]);
		tmp = tmp + (k <= n / 2 ? (max(0LL,n - 2 * k -1 ))*q : max(0LL,(2 * k - n - 1))*p);
		ans = min(ans, tmp);
	}
	printf("%I64d\n", ans);
//	system("pause");
	return 0;
}


#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <limits.h>
#include <math.h>
#include <vector>
#include <unordered_map>
#include <map>
#include <bitset>
#include <sstream>
#include <set>
#include <stack>
#include <queue>
using namespace std;
#define ll long long
#define vi vector<int>
#define pii pair<int,int>

ll n, l, r, p, q;
ll sum[100005];

int main()
{
	scanf("%I64d%I64d%I64d%I64d%I64d", &n, &l, &r, &p, &q);
	ll w;
	for (int i = 1; i <= n; i++){
		scanf("%I64d", &w);
		sum[i] = w + sum[i - 1];
	}
	ll ans = 1e18;
	for (int k = 1; k <= n - 1; k++){
		ll tmp = l*(sum[k]) + r*(sum[n] - sum[k]);
		tmp = tmp + (k <= n / 2 ? ((n - 2 * k) / 2)*q : ((2 * k - n) / 2)*p);
		ans = min(ans, tmp);
	}
	printf("%I64d\n", ans);
//	system("pause");
	return 0;
}


#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <limits.h>
#include <math.h>
#include <vector>
#include <unordered_map>
#include <map>
#include <bitset>
#include <sstream>
#include <set>
#include <stack>
#include <queue>
using namespace std;
#define ll long long
#define vi vector<int>
#define pii pair<int,int>

ll n, l, r, p, q;
ll sum[100005];

int main()
{
	scanf("%I64d%I64d%I64d%I64d%I64d", &n, &l, &r, &p, &q);
	ll w;
	for (int i = 1; i <= n; i++){
		scanf("%I64d", &w);
		sum[i] = w + sum[i - 1];
	}
	ll ans = 1e18;
	for (int k = 0; k <= n; k++){
		ll tmp = l*(sum[k]) + r*(sum[n] - sum[k]);
		tmp = tmp + (k <= n / 2 ? (n - 2 * k -1 )*q : (2 * k - n - 1)*p);
		ans = min(ans, tmp);
	}
	printf("%I64d\n", ans);
//	system("pause");
	return 0;
}


#include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define sz(v) (int)(v.size())
#define clr(v, d) memset(v, d, sizeof(v))
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define MAX 100001

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector< vector<int> > vvi;
typedef pair<int, int> ii;
typedef vector<ii> vii;

const int OO = (int)1e9;
const int NMAX = (int)1e5 + 10;

int main(void) {

   ll n, l, r, ql, qr;

   while(cin>>n>>l>>r>>ql>>qr){

        vector<ll> x(n);
        for(int i=0; i<n; i++)
            cin>>x[i];

        vector<ll> pre(n+1); pre[0] = 0;

        for(int i=1; i<=n; i++)
            pre[i] = pre[i-1] + x[i-1];

        vector<ll> suf(n+1); suf[n] = 0;

        for(int i=n-1; i>=0; i--)
            suf[i] = suf[i+1] + x[i];

        ll res = OO;
        for(int i=0; i<=n; i++){

            ll m = pre[i] * l + suf[i] * r;
            ll p = 0;

            if(i <= n-i)
                p = qr * max((ll)0, n-2*i-1);
            else
                p = ql * (2*i-n-1);

            //cout<<m<<" "<<p<<"\n";
            //cout<<m+p<<"\n";

            res = min(res, m+p);
        }

        cout<<res<<"\n";
   }

    return 0;
}


#include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define sz(v) (int)(v.size())
#define clr(v, d) memset(v, d, sizeof(v))
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define MAX 100001

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector< vector<int> > vvi;
typedef pair<int, int> ii;
typedef vector<ii> vii;

const int OO = (int)1e9;
const int NMAX = (int)1e5 + 10;

int main(void) {

   ll n, l, r, ql, qr;

   while(cin>>n>>l>>r>>ql>>qr){

        vector<ll> x(n);
        for(int i=0; i<n; i++)
            cin>>x[i];

        vector<ll> pre(n+1); pre[0] = 0;

        for(int i=1; i<=n; i++)
            pre[i] = pre[i-1] + x[i-1];

        vector<ll> suf(n+1); suf[n] = 0;

        for(int i=n-1; i>=0; i--)
            suf[i] = suf[i+1] + x[i];

        ll res = OO;
        for(int i=0; i<=n; i++){

            ll m = pre[i] * l + suf[i] * r;
            ll ml = 0;

            if(i < n-i)
                ml = qr;
            if(i > n-i)
                ml = ql;

            ll p = ml * abs(n-2*i-1);

            //cout<<m+p<<"\n";

            res = min(res, m+p);
        }

        cout<<res<<"\n";
   }

    return 0;
}


#include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define sz(v) (int)(v.size())
#define clr(v, d) memset(v, d, sizeof(v))
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define MAX 100001

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector< vector<int> > vvi;
typedef pair<int, int> ii;
typedef vector<ii> vii;

const int OO = (int)1e9;
const int NMAX = (int)1e5 + 10;

int main(void) {

   int n, l, r, ql, qr;

   while(cin>>n>>l>>r>>ql>>qr){

        vi x(n);
        for(int i=0; i<n; i++)
            cin>>x[i];

        vi pre(n+1); pre[0] = 0;

        for(int i=1; i<=n; i++)
            pre[i] = pre[i-1] + x[i-1];

        vi suf(n+1); suf[n] = 0;

        for(int i=n-1; i>=0; i--)
            suf[i] = suf[i+1] + x[i];

        ll res = OO;
        for(int i=0; i<n; i++){

            ll m = pre[i] * l + suf[i] * r;
            ll ml = 0;

            if(i < n-i)
                ml = qr;
            if(i > n-i)
                ml = ql;

            ll p = ml * abs(n-2*i-1);

            res = min(res, m+p);
        }

        cout<<res<<"\n";
   }

    return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define mod 1000000007
#define what_is(x) cerr << #x << " is " << x << endl;
#define MAXN 100005

ll n, l, r, ql, qr, a[MAXN], pre[MAXN], post[MAXN], ans[MAXN];

int main() {
	cin>>n>>l>>r>>ql>>qr;
	for(int i=0;i<n;i++) {
		cin>>a[i];
	}
	pre[0] = l * a[0];
	for(int i=1;i<n;i++) {
		pre[i] = pre[i-1] + l * a[i];
		// cout<<pre[i]<<" ";
	}
	// cout<<"\n";
	post[n-1] = r * a[n-1];
	for(int i=n-2;i>=0;i--) {
		post[i] = post[i+1] + r * a[i];
		// cout<<post[i]<<" ";
	}
	// cout<<"\n";
	for(int i=0;i<n-1;i++) {
		ans[i] = pre[i] + post[i+1];
		if( (i+1) > (n-(i+1))) {
			ll penalty = (i+1) - (n - (i+1));
			penalty = max(0LL, penalty - 1);
			ans[i] += penalty * ql;
		} else {
			ll penalty = (n - (i+1)) - (i+1);
			penalty = max(0LL, penalty - 1);
			ans[i] += penalty * qr;
		}
		// cout<<ans[i]<<" ";
	}
	ll minn = (1LL<<45);
	for(int i=0;i<n-1;i++) {
		minn = min(minn, ans[i]);
	}
	// cout<<minn<<"\n";
	minn = min(minn, min(post[0] * n * ((n!=1)?qr:1), pre[n-1] * n * ((n!=1)?ql:1)));
	cout<<minn<<"\n";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define mod 1000000007
#define what_is(x) cerr << #x << " is " << x << endl;
#define MAXN 100005

ll n, l, r, ql, qr, a[MAXN], pre[MAXN], post[MAXN], ans[MAXN];

int main() {
	cin>>n>>l>>r>>ql>>qr;
	for(int i=0;i<n;i++) {
		cin>>a[i];
	}
	pre[0] = l * a[0];
	for(int i=1;i<n;i++) {
		pre[i] = pre[i-1] + l * a[i];
		// cout<<pre[i]<<" ";
	}
	// cout<<"\n";
	post[n-1] = r * a[n-1];
	for(int i=n-2;i>=0;i--) {
		post[i] = post[i+1] + r * a[i];
		// cout<<post[i]<<" ";
	}
	// cout<<"\n";
	for(int i=0;i<n-1;i++) {
		ans[i] = pre[i] + post[i+1];
		if( (i+1) > (n-(i+1))) {
			ll penalty = (i+1) - (n - (i+1));
			penalty = max(0LL, penalty - 1);
			ans[i] += penalty * ql;
		} else {
			ll penalty = (n - (i+1)) - (i+1);
			penalty = max(0LL, penalty - 1);
			ans[i] += penalty * qr;
		}
		// cout<<ans[i]<<" ";
	}
	ll minn = (1LL<<45);
	for(int i=0;i<n-1;i++) {
		minn = min(minn, ans[i]);
	}
	minn = min(minn, min(post[0] * n * qr, pre[n-1] * n * ql));
	cout<<minn<<"\n";
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define mod 1000000007
#define what_is(x) cerr << #x << " is " << x << endl;
#define MAXN 100005

ll n, l, r, ql, qr, a[MAXN], pre[MAXN], post[MAXN], ans[MAXN];

int main() {
	cin>>n>>l>>r>>ql>>qr;
	for(int i=0;i<n;i++) {
		cin>>a[i];
	}
	pre[0] = l * a[0];
	for(int i=1;i<n;i++) {
		pre[i] = pre[i-1] + l * a[i];
		// cout<<pre[i]<<" ";
	}
	// cout<<"\n";
	post[n-1] = r * a[n-1];
	for(int i=n-2;i>=0;i--) {
		post[i] = post[i+1] + r * a[i];
		// cout<<post[i]<<" ";
	}
	// cout<<"\n";
	for(int i=0;i<n-1;i++) {
		ans[i] = pre[i] + post[i+1];
		if( (i+1) > (n-(i+1))) {
			ll penalty = (i+1) - (n - (i+1));
			penalty = max(0LL, penalty - 1);
			ans[i] += penalty * ql;
		} else {
			ll penalty = (n - (i+1)) - (i+1);
			penalty = max(0LL, penalty - 1);
			ans[i] += penalty * qr;
		}
		// cout<<ans[i]<<" ";
	}
	ll minn = (1LL<<45);
	for(int i=0;i<n-1;i++) {
		minn = min(minn, ans[i]);
	}
	// cout<<minn<<"\n";
	minn = min(minn, min(post[0] + (n-1)*qr, pre[n-1] + (n-1)*ql));
	cout<<minn<<"\n";
	return 0;
}


#include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define MOD 1000000007
#define DOMOD(d) if ((d) >= MOD) d %= MOD;
#define DONEGMOD(d) if ((d) < 0) d = ((d % MOD) + MOD) % MOD;

#define inp(a) scanf("%d", &a)
#define inp2(a,b) scanf("%d %d", &a, &b)
#define inp3(a,b,c) scanf("%d %d %d", &a, &b, &c)
#define inp4(a,b,c,d) scanf("%d %d %d %d", &a, &b, &c, &d)

#define inpl(a) scanf("%lld", &a)
#define inpl2(a,b) scanf("%lld %lld", &a, &b)
#define inpl3(a,b,c) scanf("%lld %lld %lld", &a, &b, &c)
#define inpl4(a,b,c,d) scanf("%lld %lld %lld %lld", &a, &b, &c, &d)
#define all(v) (v).begin(), (v).end()
#define rep(i,a,b) for (int i=a;i<b;i++)
#define mset(a,val) memset(a,val,sizeof(a))
#define printv(v) for (int i=0;i<(int) v.size(); i++) cout<<v[i]<<" "
#define MAX 100005
using namespace std ;
typedef long long int ll ;
typedef pair<int,int> pii ;
typedef pair<long long , long long > pll ;
typedef pair<int,pii> pipi ;
typedef pair<int,pair<int,string>> piis ;
typedef pair<ll,string> pls ;
typedef pair<ll,pll> plpl ;

int arr[MAX], dp[MAX] ;
int n , l , r , ql , qr ;

int comp(int curl , int curr , int last)
{
	int temp = 0, left, right, altr, mid ;
	for (int i=2;i<=n;i++)
	{
		if (last == -1)
		{
			left = (dp[curr] - dp[curl-1]) * l + (curr-curl+1)*ql ;
			right = (dp[curr] - dp[curl-1]) * r + (curr-curl) * qr ;

			mid = (curl + curr - 1) / 2 ;
			altr = (dp[mid] - dp[curl-1])*l + (dp[curr] - dp[mid])*r ;

		}else
		{
			left = (dp[curr] - dp[curl-1]) * l + (curr-curl)*ql ;
			right = (dp[curr] - dp[curl-1]) * r + (curr-curl+1) * qr ;

			mid = (curl + curr) / 2 ;
			altr = (dp[mid] - dp[curl-1])*l + (dp[curr] - dp[mid])*r ;
		}

		//cout<<left<<" "<<right<<" "<<altr<<" "<<mid<<endl ;

		if (min(left,right) < altr)
		{
			return ( temp + min(left,right) ) ;
		}

		if (last == -1)
		{
			temp += r*arr[curr] ; curr-- ; last = 1 ;
		}else
		{
			temp += l*arr[curl] ; curl++ ; last = -1 ;
		}

	}
	return temp ;
}

int main()
{
	#ifdef DIRI
		freopen("inp.txt","r",stdin) ;
		//freopen("out.txt","w",stdout) ;
	#endif

	time_t start = clock() ;

	cin>>n>>l>>r>>ql>>qr ;
	dp[0] = 0 ;
	for (int i=1;i<=n;i++)
	{
		inp(arr[i]) ;
		dp[i] = dp[i-1] + arr[i] ;
	}

	int best1 , best2 ;

	best1 = l*arr[1] + comp( 2 , n , -1 ) ;
	//cerr<<"break"<<endl ;
	best2 = r*arr[n] + comp( 1 , n-1 , 1 ) ;

	cout<<min(best1,best2)<<endl ;

	time_t end = clock() ;

	double tt = (end - start) / CLOCKS_PER_SEC ;
	cerr<<fixed<<setprecision(5)<<tt<<endl ;

    return 0 ;
}


#include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define MOD 1000000007
#define DOMOD(d) if ((d) >= MOD) d %= MOD;
#define DONEGMOD(d) if ((d) < 0) d = ((d % MOD) + MOD) % MOD;

#define inp(a) scanf("%d", &a)
#define inp2(a,b) scanf("%d %d", &a, &b)
#define inp3(a,b,c) scanf("%d %d %d", &a, &b, &c)
#define inp4(a,b,c,d) scanf("%d %d %d %d", &a, &b, &c, &d)

#define inpl(a) scanf("%lld", &a)
#define inpl2(a,b) scanf("%lld %lld", &a, &b)
#define inpl3(a,b,c) scanf("%lld %lld %lld", &a, &b, &c)
#define inpl4(a,b,c,d) scanf("%lld %lld %lld %lld", &a, &b, &c, &d)
#define all(v) (v).begin(), (v).end()
#define rep(i,a,b) for (int i=a;i<b;i++)
#define mset(a,val) memset(a,val,sizeof(a))
#define printv(v) for (int i=0;i<(int) v.size(); i++) cout<<v[i]<<" "
#define MAX 100005
using namespace std ;
typedef long long int ll ;
typedef pair<int,int> pii ;
typedef pair<long long , long long > pll ;
typedef pair<int,pii> pipi ;
typedef pair<int,pair<int,string>> piis ;
typedef pair<ll,string> pls ;
typedef pair<ll,pll> plpl ;

int arr[MAX], dp[MAX] ;
int n , l , r , ql , qr ;

int main()
{
	#ifdef DIRI
		freopen("inp.txt","r",stdin) ;
		//freopen("out.txt","w",stdout) ;
	#endif

	time_t start = clock() ;

	cin>>n>>l>>r>>ql>>qr ;
	dp[0] = 0 ;
	for (int i=1;i<=n;i++)
	{
		inp(arr[i]) ;
		dp[i] = dp[i-1] + arr[i] ;
	}

	int temp , best = 2000000000, left , right ;

	for (int i=0;i<=n;i++)
	{
		left = i ; right = n-i ;
		temp = dp[left]*l + ( dp[n] - dp[left] ) * r ;
		temp += max( right - left - 1 , 0 ) * qr ;
		temp += max( left - right - 1 , 0 ) * ql ;
		best = min(best,temp) ;
	}

	cout<<best<<endl ;

	time_t end = clock() ;

	double tt = (end - start) / CLOCKS_PER_SEC ;
	cerr<<fixed<<setprecision(5)<<tt<<endl ;

    return 0 ;
}


#include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define MOD 1000000007
#define DOMOD(d) if ((d) >= MOD) d %= MOD;
#define DONEGMOD(d) if ((d) < 0) d = ((d % MOD) + MOD) % MOD;

#define inp(a) scanf("%d", &a)
#define inp2(a,b) scanf("%d %d", &a, &b)
#define inp3(a,b,c) scanf("%d %d %d", &a, &b, &c)
#define inp4(a,b,c,d) scanf("%d %d %d %d", &a, &b, &c, &d)

#define inpl(a) scanf("%lld", &a)
#define inpl2(a,b) scanf("%lld %lld", &a, &b)
#define inpl3(a,b,c) scanf("%lld %lld %lld", &a, &b, &c)
#define inpl4(a,b,c,d) scanf("%lld %lld %lld %lld", &a, &b, &c, &d)
#define all(v) (v).begin(), (v).end()
#define rep(i,a,b) for (int i=a;i<b;i++)
#define mset(a,val) memset(a,val,sizeof(a))
#define printv(v) for (int i=0;i<(int) v.size(); i++) cout<<v[i]<<" "
#define MAX 100005
using namespace std ;
typedef long long int ll ;
typedef pair<int,int> pii ;
typedef pair<long long , long long > pll ;
typedef pair<int,pii> pipi ;
typedef pair<int,pair<int,string>> piis ;
typedef pair<ll,string> pls ;
typedef pair<ll,pll> plpl ;

int arr[MAX], dp[MAX] ;
int n , l , r , ql , qr ;

int main()
{
	#ifdef DIRI
		freopen("inp.txt","r",stdin) ;
		//freopen("out.txt","w",stdout) ;
	#endif

	time_t start = clock() ;

	cin>>n>>l>>r>>ql>>qr ;
	dp[0] = 0 ;
	for (int i=1;i<=n;i++)
	{
		inp(arr[i]) ;
		dp[i] = dp[i-1] + arr[i] ;
	}

	int temp , best = 2000000000, left , right ;

	for (int i=1;i<=n;i++)
	{
		left = i ; right = n-i ;
		temp = dp[left]*l + ( dp[n] - dp[left] ) * r ;
		temp += max( right - left - 1 , 0 ) * qr ;
		temp += max( left - right - 1 , 0 ) * ql ;
		best = min(best,temp) ;
	}

	cout<<best<<endl ;

	time_t end = clock() ;

	double tt = (end - start) / CLOCKS_PER_SEC ;
	cerr<<fixed<<setprecision(5)<<tt<<endl ;

    return 0 ;
}


#include <bits/stdc++.h>
#define read freopen("/home/kislaya/init.txt","r",stdin);
#define write freopen("/home/kislaya/out.txt","w",stdout);
#define pb push_back
#define f first
#define s second
#define inf 100000000000000000
#define optimize_shit cin.sync_with_stdio(0);cin.tie(0);
using namespace std;
typedef long long int ll;
typedef pair<int,int> ii;
typedef pair<ii,int> iii;
ll w[100005];
ll suml[100005],sumr[100005];
int main()
{
    optimize_shit
    ll n,l,r,Ql,Qr;
    cin>>n>>l>>r>>Ql>>Qr;
    for(int i=1;i<=n;i++)
        cin>>w[i],suml[i]=suml[i-1]+w[i];
    for(int i=n;i>=1;i--)
        sumr[i]=sumr[i+1]+w[i];
    ll ans=inf;
    for(int i=1;i<=n;i++)
    {
        ll tmp=l*suml[i-1]+r*sumr[i+1];
        tmp+=min(l,r)*w[i];
        //cout<<i<<" rest:"<<l*suml[i-1]+r*sumr[i+1]<<" this el:"<<min(l,r)*w[i]<<" ";
        ll x=i-1,y=n-i;
        if(x>y and n>2)
            tmp+=(x-y)*Ql;
        else if(n>2)
            tmp+=(y-x)*Qr;
        //cout<<" "<<tmp<<endl;
        ans=min(tmp,ans);
    }
    cout<<ans;
    return 0;
}


#include <bits/stdc++.h>
#define read freopen("/home/kislaya/init.txt","r",stdin);
#define write freopen("/home/kislaya/out.txt","w",stdout);
#define pb push_back
#define f first
#define s second
#define inf 100000000000000000
#define optimize_shit cin.sync_with_stdio(0);cin.tie(0);
using namespace std;
typedef long long int ll;
typedef pair<int,int> ii;
typedef pair<ii,int> iii;
ll w[100005];
ll suml[100005],sumr[100005];
int main()
{
    optimize_shit
    ll n,l,r,Ql,Qr;
    cin>>n>>l>>r>>Ql>>Qr;
    for(int i=1;i<=n;i++)
        cin>>w[i],suml[i]=suml[i-1]+w[i];
    for(int i=n;i>=1;i--)
        sumr[i]=sumr[i+1]+w[i];
    ll ans=inf;
    for(int i=0;i<=n;i++)
    {
        ll tmp=l*suml[i]+r*sumr[i+1];
        //cout<<i<<" rest:"<<l*suml[i-1]+r*sumr[i+1]<<" this el:"<<min(l,r)*w[i]<<" ";
        if(i>n-i)
            tmp+=(2*i-n-1)*Ql;
        if(i< n-i)
            tmp+=(n-2*i-1)*Qr;
        //cout<<" "<<tmp<<endl;
        ans=min(tmp,ans);
    }
    cout<<ans;
    return 0;
}


#include <bits/stdc++.h>
#define read freopen("/home/kislaya/init.txt","r",stdin);
#define write freopen("/home/kislaya/out.txt","w",stdout);
#define pb push_back
#define f first
#define s second
#define inf 10000000000
#define optimize_shit cin.sync_with_stdio(0);cin.tie(0);
using namespace std;
typedef long long int ll;
typedef pair<int,int> ii;
typedef pair<ii,int> iii;
ll w[100005];
ll suml[100005],sumr[100005];
int main()
{
    optimize_shit
    ll n,l,r,Ql,Qr;
    cin>>n>>l>>r>>Ql>>Qr;
    for(int i=1;i<=n;i++)
        cin>>w[i],suml[i]=suml[i-1]+w[i];
    for(int i=n;i>=1;i--)
        sumr[i]=sumr[i+1]+w[i];
    ll ans=inf;
    for(int i=1;i<=n;i++)
    {
        ll tmp=l*suml[i-1]+r*sumr[i+1];
        tmp+=min(l,r)*w[i];

        ll x=i-1,y=n-i;
        if(x>y)
            tmp+=(x-y)*Ql;
        else
            tmp+=(y-x)*Qr;
        ans=min(tmp,ans);
    }
    cout<<ans;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
const int MAX = 100005;
int arr[MAX];
int pre[MAX];
int main(){
	freopen("input.in", "r", stdin);
	int n, l, r, ql, qr;
	scanf("%d", &n);
	scanf("%d %d %d %d", &l, &r, &ql, &qr);
	for(int i=0; i<n; i++){
		scanf("%d", arr + i);
		pre[i+1] = arr[i] + pre[i];
	}

	long long mn = LLONG_MAX;
	for(int i=0; i<=n; i++){
		int left = i;
		int right = n-i;
		long long cur = l * (long long) pre[i] + r * (long long) (pre[n] - pre[i]);
		if(left - 1 > right){
			cur += (left - right - 1) * ql;
		}else if(right - 1 > left){
			cur += (right - left - 1) * qr;
		}
		mn = min(mn, cur);
	}
	printf("%lld\n", mn);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
const int MAX = 100005;
int arr[MAX];
int pre[MAX];
int main(){
	int n, l, r, ql, qr;
	scanf("%d", &n);
	scanf("%d %d %d %d", &l, &r, &ql, &qr);
	for(int i=0; i<n; i++){
		scanf("%d", arr + i);
		pre[i+1] = arr[i] + pre[i];
	}

	long long mn = LLONG_MAX;
	for(int i=0; i<=n; i++){
		int left = i;
		int right = n-i;
		long long cur = l * (long long) pre[i] + r * (long long) (pre[n] - pre[i]);
		if(left - 1 > right){
			cur += (left - right - 1) * ql;
		}else if(right - 1 > left){
			cur += (right - left - 1) * qr;
		}
		mn = min(mn, cur);
	}
	printf("%lld\n", mn);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
const int MAX = 100005;
int arr[MAX];
int pre[MAX];
int main(){
	int n, l, r, ql, qr;
	scanf("%d", &n);

	scanf("%d %d %d %d", &l, &r, &ql, &qr);
	for(int i=0; i<n; i++){
		scanf("%d", arr + i);
		pre[i+1] = arr[i] + pre[i];
	}

	long long mx = 0;
	for(int i=0; i<=n; i++){
		int left = i;
		int right = n-i;
		long long cur = l * (long long) pre[i] + r * (long long) (pre[n] - pre[i]);
		if(left - 1 > right){
			cur += (left - right - 1) * ql;
		}else if(right - 1 > left){
			cur += (right - left - 1) * qr;
		}
		mx = max(mx, cur);
	}
	printf("%lld\n", mx);
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define OO 2e18
#define oo 2e9
#define yalla ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define FILES freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define sz  100005
#define re return
#define mod  1000000007
#define pi acos(-1)
using namespace std;
ll n,l,r,ql,qr,x;
ll ans,w[sz],tot[sz],mini=OO;
///
int main()
{yalla;
 cin>>n>>l>>r>>ql>>qr;
 for(int i=1;i<=n;i++)
   cin>>w[i],tot[i]=tot[i-1]+w[i];
///
for(int i=0;i<=n;i++)
{ll sum_from_left=tot[i]*l;
 ll sum_from_right=(tot[n]-tot[i] )*r;
 ///
 ans=sum_from_left+sum_from_right;

 if(i<n-i)
  ans+=(qr* (n-i-i-1) );
 else if(i>n-i)
  {ll taken=n-i+1;
   ll rim=i-1;
   ll eq=rim-(taken-1);
      ans+=(ql* eq);
  }
 ///
 mini=min(mini,ans);
}

cout<<min(mini,(l*tot[n])+(n*ql) )<<endl;
 re 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define OO 2e18
#define oo 2e9
#define yalla ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define FILES freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define sz  100005
#define re return
#define mod  1000000007
#define pi acos(-1)
using namespace std;
ll n,l,r,ql,qr,x;
ll last=-1,e,s,sum,tmp2,tot[sz],mini=oo;
deque<ll>w,w2;
///
int main()
{yalla;
 cin>>n>>l>>r>>ql>>qr;
 for(int i=1;i<=n;i++)
   cin>>x,w.push_back(x),tot[i]=tot[i-1]+x;
w2=w;
///first case
for(int i=0;i<2;i++)
{w=w2; sum=0,s=1,e=n;
if(i==0)
sum+=w.front()*l,last=0,w.pop_front(),s++;
else
sum+=w.back()*r,last=1,w.pop_back(),e--;
 ///
 while(!w.empty())
 {int leftt=w.front()*l;///0
  int rightt=w.back()*r;///1
  int num=(e-s+1);

  if(last==0)
   {tmp2=((tot[e]-tot[s-1])*l)+(ql*num);

     if(rightt<tmp2)
      sum+=rightt,w.pop_back(),last=1,e--;
     else
       {sum+=tmp2; break;}
   }
   else
   {tmp2=((tot[e]-tot[s-1])*r)+(qr*num);

     if(leftt<tmp2)
       sum+=leftt,w.pop_front(),last=0,s++;
     else
      {sum+=tmp2; break;}
   }
 }
 mini=min(mini,sum);
}
 cout<<mini<<endl;
 re 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define OO 2e18
#define oo 2e9
#define yalla ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define FILES freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define sz  100005
#define re return
#define mod  1000000007
#define pi acos(-1)
using namespace std;
ll n,l,r,ql,qr,x;
ll last=-1,e,s,sum,tmp2,tot[sz],mini=OO;
deque<ll>w,w2;
///
int main()
{yalla;
 cin>>n>>l>>r>>ql>>qr;
 for(int i=1;i<=n;i++)
   cin>>x,w.push_back(x),tot[i]=tot[i-1]+x;
w2=w;
///first case
for(int i=0;i<2;i++)
{w=w2; sum=0,s=1,e=n;
if(i==0)
sum+=w.front()*l,last=0,w.pop_front(),s++;
else
sum+=w.back()*r,last=1,w.pop_back(),e--;
 ///
 while(!w.empty())
 {ll leftt=w.front()*l;///0
  ll rightt=w.back()*r;///1
  int num=(e-s+1);

  if(last==0)
   {tmp2=((tot[e]-tot[s-1])*l)+(ql*num);

     if(rightt<tmp2)
      sum+=rightt,w.pop_back(),last=1,e--;
     else
       {sum+=tmp2; break;}
   }
   else
   {tmp2=((tot[e]-tot[s-1])*r)+(qr*num);

     if(leftt<tmp2)
       sum+=leftt,w.pop_front(),last=0,s++;
     else
      {sum+=tmp2; break;}
   }
 }
 mini=min(mini,sum);
}
ll case1=(tot[n]*l)+(ql*n),case2=(tot[n]*r)+(qr*n);
 cout<<min(mini,min(case1,case2))<<endl;
 re 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define OO 2e18
#define oo 2e9
#define yalla ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define FILES freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define sz  100005
#define re return
#define mod  1000000007
#define pi acos(-1)
using namespace std;
ll n,l,r,ql,qr,x;
ll last=-1,e,s,sum,tmp2,tot[101],mini=oo;
deque<ll>w,w2;
///
int main()
{yalla;
 cin>>n>>l>>r>>ql>>qr;
 for(int i=1;i<=n;i++)
   cin>>x,w.push_back(x),tot[i]=tot[i-1]+x;
w2=w;
///first case
for(int i=0;i<2;i++)
{w=w2; sum=0,s=1,e=n;
if(i==0)
sum+=w.front()*l,last=0,w.pop_front(),s++;
else
sum+=w.back()*r,last=1,w.pop_back(),e--;
 ///
 while(!w.empty())
 {int leftt=w.front()*l;///0
  int rightt=w.back()*r;///1
  int num=(e-s+1);

  if(last==0)
   {tmp2=((tot[e]-tot[s-1])*l)+(ql*num);

     if(rightt<tmp2)
      sum+=rightt,w.pop_back(),last=1,e--;
     else
       {sum+=tmp2; break;}
   }
   else
   {tmp2=((tot[e]-tot[s-1])*r)+(qr*num);

     if(leftt<tmp2)
       sum+=leftt,w.pop_front(),last=0,s++;
     else
      {sum+=tmp2; break;}
   }
 }
 mini=min(mini,sum);
}
 cout<<mini<<endl;
 re 0;
}


#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define OO 2e18
#define oo 2e9
#define yalla ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define FILES freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define sz  100005
#define re return
#define mod  1000000007
#define pi acos(-1)
using namespace std;
ll n,l,r,ql,qr,x;
ll ans,w[sz],tot[sz],mini=OO;
///
int main()
{yalla;
 cin>>n>>l>>r>>ql>>qr;
 for(int i=1;i<=n;i++)
   cin>>w[i],tot[i]=tot[i-1]+w[i];
///
for(int i=0;i<=n;i++)
{ll sum_from_left=tot[i]*l;
 ll sum_from_right=(tot[n]-tot[i] )*r;
 int half=ceil(n/2.0);
 ///
 ans=sum_from_left+sum_from_right;

 if(i<n-i)
  ans+=(qr* (n-i-i-1) );
 else if(i>n-i)
  {ll taken=n-i+1;
   ll rim=i-1;
   ll eq=rim-(taken-1);
      ans+=(ql* eq);
  }
 ///
 mini=min(mini,ans);
}

cout<<min(mini,l*tot[n])<<endl;
 re 0;
}


#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second

using namespace std;

const ll MXN = 1e6 + 1;
const ll MOD = 1e9 + 7;

void free()
{
    freopen("txt.in", "r", stdin);
    freopen("txt.out", "w", stdout);
}

ll a, a1, b, b1, n, w[MXN], mn = MOD, sum[MXN];

int main()
{
    //free();
    cin >> n >> a >> b >> a1 >> b1;
    sum[0] = 0;
    for(int i = 1; i <= n; i++){
        cin >> w[i];
        sum[i] += sum[i - 1] + w[i];
    }
    for(int i = 1; i <= n; i++){
        ll ans = (sum[i] * a) + ((sum[n] - sum[i]) * b);
        if(i < n - i){
            ans += (n - (2 * i) - 1) * b1;
        }
        if(i > n - i) {
            ans += ((2 * i) - n - 1) * a1;
        }
        mn = min(ans, mn);
    }
    cout << mn;
}


#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second

using namespace std;

const ll MXN = 1e6 + 1;
const ll MOD = 1e9 + 7;

void free()
{
    freopen("txt.in", "r", stdin);
    freopen("txt.out", "w", stdout);
}

ll a, a1, b, b1, n, w[MXN], mn = MOD, sum[MXN];

int main()
{
    //free();
    cin >> n >> a >> b >> a1 >> b1;
    sum[0] = 0;
    for(int i = 1; i <= n; i++){
        cin >> w[i];
        sum[i] += sum[i - 1] + w[i];
    }
    if(n == 1){
        cout << min((w[1] * a), (w[1] * b));
        return 0;
    }
    for(int i = 1; i <= n; i++){
        ll ans = (sum[i] * a) + ((sum[n] - sum[i]) * b);
        if(i < n - i){
            ans += (n - (2 * i) - 1) * b1;
        }
        if(i > n - i) {
            ans += ((2 * i) - n - 1) * a1;
        }
        mn = min(ans, mn);
    }
    cout << mn;
}


#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second

using namespace std;

const ll MXN = 1e6 + 1;
const ll MOD = 1e9 + 7;

void free()
{
    freopen("txt.in", "r", stdin);
    freopen("txt.out", "w", stdout);
}

ll a, a1, b, b1, n, w[MXN], mn = MOD, sum[MXN];

int main()
{
    //free();
    cin >> n >> a >> b >> a1 >> b1;
    sum[0] = 0;
    for(int i = 1; i <= n; i++){
        cin >> w[i];
        sum[i] += sum[i - 1] + w[i];
    }
    if(n == 1){
        cout << min((w[1] * a), (w[1] * b));
        return 0;
    }
    for(int i = 0; i <= n; i++){
        ll ans = (sum[i] * a) + ((sum[n] - sum[i]) * b);
        if(i < n - i){
            ans += (n - (2 * i) - 1) * b1;
        }
        if(i > n - i) {
            ans += ((2 * i) - n - 1) * a1;
        }
        mn = min(ans, mn);
    }
    cout << mn;
}


#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <queue>

using namespace std;

#define FU(i, a, b) for(decltype(b) i = (a); i < (b); ++i)
#define fu(i, n) FU(i, 0, n)

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
typedef vector<ll> vll;
typedef long double ld;
typedef vector<ld> vld;

int main(){
    int n, l, r;
    ll ql, qr;
    scanf("%d %d %d %I64d %I64d", &n, &l, &r, &ql, &qr);
    vi W(n);
    fu(i, n) scanf("%d", &W[i]);
    vll S(n);
    S[0] = W[0];
    FU(i, 1, n) S[i] = S[i-1] + W[i];
    ll best = S[n-1]*r + qr*(n-1);
    ll cur = 0;
    if(n==1) {printf("%d", min(l*W[0], r*W[0])); return 0;}
    fu(i, n/2){
        cur = S[i]*l + (S[n-1]-S[i])*r + qr*(max(n-2*(i+1) - 1,0));
        best = min(best, cur);
    }
    FU(i, n/2, n){
        cur = S[i]*l + (S[n-1]-S[i])*r + ql*(max(n-2*(n-i-1) - 1,0));
        best = min(best, cur);
    }
    printf("%I64d", best);
    return 0;
}


#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <queue>

using namespace std;

#define FU(i, a, b) for(decltype(b) i = (a); i < (b); ++i)
#define fu(i, n) FU(i, 0, n)

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
typedef vector<ll> vll;
typedef long double ld;
typedef vector<ld> vld;

int main(){
    int n, l, r, ql, qr;
    scanf("%d %d %d %d %d", &n, &l, &r, &ql, &qr);
    vi W(n);
    fu(i, n) scanf("%d", &W[i]);
    vll S(n);
    S[0] = W[0];
    FU(i, 1, n) S[i] = S[i-1] + W[i];
    ll best = 1000000000000000;
    ll cur = 0;
    if(n==1) {printf("%d", min(l*W[0], r*W[0])); return 0;}
    fu(i, n/2){
        cur = S[i]*l + (S[n-1]-S[i])*r + (max(n-2*(i+1) - 1,0))*qr;
        best = min(best, cur);
    }
    FU(i, n/2, n){
        cur = S[i]*l + (S[n-1]-S[i])*r + (max(n-2*(n-i-1) - 1,0))*ql;
        best = min(best, cur);
    }
    printf("%I64d", best);
    return 0;
}


#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <queue>

using namespace std;

#define FU(i, a, b) for(decltype(b) i = (a); i < (b); ++i)
#define fu(i, n) FU(i, 0, n)

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
typedef vector<ll> vll;
typedef long double ld;
typedef vector<ld> vld;

int main(){
    int n, l, r, ql, qr;
    scanf("%d %d %d %d %d", &n, &l, &r, &ql, &qr);
    vi W(n);
    fu(i, n) scanf("%d", &W[i]);
    vi S(n);
    S[0] = W[0];
    FU(i, 1, n+1) S[i] = S[i-1] + W[i];
    ll best = 1000000000000000;
    ll cur = 0;
    fu(i, n/2){
        cur = S[i]*l + (S[n-1]-S[i])*r + (max(n-2*(i+1) - 1,0))*qr;
        best = min(best, cur);
    }
    FU(i, n/2, n){
        cur = S[i]*l + (S[n-1]-S[i])*r + (max(n-2*(n-i-1) - 1,0))*ql;
        best = min(best, cur);
    }
    printf("%I64d", best);
    return 0;
}


#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <queue>

using namespace std;

#define FU(i, a, b) for(decltype(b) i = (a); i < (b); ++i)
#define fu(i, n) FU(i, 0, n)

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
typedef vector<ll> vll;
typedef long double ld;
typedef vector<ld> vld;

int main(){
    int n, l, r;
    ll ql, qr;
    scanf("%d %d %d %I64d %I64d", &n, &l, &r, &ql, &qr);
    vi W(n);
    fu(i, n) scanf("%d", &W[i]);
    vll S(n);
    S[0] = W[0];
    FU(i, 1, n) S[i] = S[i-1] + W[i];
    ll best = 1000000000000000;
    ll cur = 0;
    if(n==1) {printf("%d", min(l*W[0], r*W[0])); return 0;}
    fu(i, n/2){
        cur = S[i]*l + (S[n-1]-S[i])*r + qr*(max(n-2*(i+1) - 1,0));
        best = min(best, cur);
    }
    FU(i, n/2, n){
        cur = S[i]*l + (S[n-1]-S[i])*r + ql*(max(n-2*(n-i-1) - 1,0));
        best = min(best, cur);
    }
    printf("%I64d", best);
    return 0;
}


#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <queue>

using namespace std;

#define FU(i, a, b) for(decltype(b) i = (a); i < (b); ++i)
#define fu(i, n) FU(i, 0, n)

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
typedef vector<ll> vll;
typedef long double ld;
typedef vector<ld> vld;

int main(){
    int n, l, r, ql, qr;
    scanf("%d %d %d %d %d", &n, &l, &r, &ql, &qr);
    vi W(n);
    fu(i, n) scanf("%d", &W[i]);
    vll S(n);
    S[0] = W[0];
    FU(i, 1, n+1) S[i] = S[i-1] + W[i];
    ll best = 1000000000000000;
    ll cur = 0;
    fu(i, n/2){
        cur = S[i]*l + (S[n-1]-S[i])*r + (max(n-2*(i+1) - 1,0))*qr;
        best = min(best, cur);
    }
    FU(i, n/2, n){
        cur = S[i]*l + (S[n-1]-S[i])*r + (max(n-2*(n-i-1) - 1,0))*ql;
        best = min(best, cur);
    }
    printf("%I64d", best);
    return 0;
}


#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <queue>

using namespace std;

#define FU(i, a, b) for(decltype(b) i = (a); i < (b); ++i)
#define fu(i, n) FU(i, 0, n)

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
typedef vector<ll> vll;
typedef long double ld;
typedef vector<ld> vld;

int main(){
    int n, l, r, ql, qr;
    scanf("%d %d %d %d %d", &n, &l, &r, &ql, &qr);
    vi W(n);
    fu(i, n) scanf("%d", &W[i]);
    vll S(n);
    S[0] = W[0];
    FU(i, 1, n) S[i] = S[i-1] + W[i];
    ll best = 1000000000000000;
    ll cur = 0;
    fu(i, n/2){
        cur = S[i]*l + (S[n-1]-S[i])*r + (max(n-2*(i+1) - 1,0))*qr;
        best = min(best, cur);
    }
    FU(i, n/2, n){
        cur = S[i]*l + (S[n-1]-S[i])*r + (max(n-2*(n-i-1) - 1,0))*ql;
        best = min(best, cur);
    }
    printf("%I64d", best);
    return 0;
}


#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <math.h>

typedef long long ll;
typedef long double ld;
#define FASTIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define PRECISION std::cout << std::fixed << std::setprecision(20);

using namespace std;

const ll inf = 1e18+1;
const int N = 4e5+1;
const ll mod = 1e9+7;
const int bits = 19;

int main(){
    FASTIO;
    PRECISION;

    ll n,l,r,ql,qr;
    cin>>n>>l>>r>>ql>>qr;

    vector<ll>arr(n);

    for(int i=0;i<n;i++){
        cin>>arr[i];
    }

    if(l<r){
        swap(l,r);
        swap(ql,qr);
        reverse(arr.begin(),arr.end());
    }

    if(l==r){
        ll sum = 0;
        for(int i=0;i<n;i++){
            sum+=arr[i]*l;
        }
        cout<<sum<<"\n";
    }else {
        int ch = 0;
        int st = 0, en = n-1;
        ll sum = 0;
        while(n--){
            if(!ch){
                sum += arr[en]*r;
                en--;
                ch = 1;
            }else{
                if(qr+arr[en]*r<=arr[st]*l){
                    sum+=qr+arr[en]*r;
                    ch = 1;
                    en--;
                }else{
                    ch = 0;
                    sum+=arr[st]*l;
                    st++;
                }
            }
        }
        cout<<sum<<"\n";
    }

}


#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <math.h>

typedef long long ll;
typedef long double ld;
#define FASTIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define PRECISION std::cout << std::fixed << std::setprecision(20);

using namespace std;

const ll inf = 1e18+1;
const int N = 4e5+1;
const ll mod = 1e9+7;
const int bits = 19;

int main(){
    FASTIO;
    PRECISION;

    ll n,l,r,ql,qr;
    cin>>n>>l>>r>>ql>>qr;

    vector<ll>arr(n+1);

    ll lsum=0,rsum=0;

    for(int i=0;i<n;i++){
        cin>>arr[i];
        rsum+=arr[i];
    }
    ll ans = inf;
    for(int left=0;left<=n;left++){
        int right = n - left;

        if(abs(left-right)<=1){
            ans = min(ans, lsum*l + rsum*r);
        }else if(left<right){
            int diff = right - left - 1;
            ans = min(ans, lsum*l + rsum*r + diff*qr);
        }else{
            int diff = left - right - 1;
            ans = min(ans, lsum*l + rsum*r + diff*ql);
        }

        lsum+=arr[left];
        rsum-=arr[left];

    }

    cout<<ans<<"\n";

}


/* Akshat Sharma @akshat98 */
#include <iostream>
#include <bits/stdc++.h>
#define IOS  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define mp   make_pair
#define pb   push_back
#define F    first
#define S    second
#define ll   long long
#define MOD  1000000007
#define MAX  1000000001
#define vi 	 vector<int>
#define vl   vector<ll>
#define vpi  vector<pair<int,int> >
#define vpl  vector<pair<ll,ll> >
#define rep(i,a,b) for(i=a;i<b;i++)
#define reqp(i,a,b) for(i=a;i<=b;i++)
#define ren for(i=0;i<n;i++)
#define ALL(a)  (a).begin(),(a).end()
using namespace std;
typedef pair<int,int>pii;
typedef pair<ll,ll>pll;

int main()
{
	#ifndef ONLINE_JUDGE
	freopen("input_file.txt", "r", stdin);
	//freopen("output_file.txt", "w", stdout);
	#endif
	int i,j,k,l,n,test_case,m,r,ql,qr,sum;
	test_case=1;
	//cin>>test_case;
	while(test_case--){
		cin>>n>>l>>r>>ql>>qr;
		vi vec(n);
		ren cin>>vec[i],sum+=vec[i];
		ll ans=sum*r+qr*(n-1);
		ll suf_sum[100005]{};
		for(i=n-1;i>=0;i--){
			suf_sum[i]=vec[i]+suf_sum[i+1];
		}
		ll cur_sum=0;
		rep(i,0,n){
			cur_sum+=vec[i];
			if(i+1>n-1-i){
				ans=min(ans,cur_sum*l+suf_sum[i+1]*r+abs(2*i+1-n)*ql);
			}else if(i+1==n-1-i){
				ans=min(ans,cur_sum*l+suf_sum[i+1]*r);
			}else{
				ans=min(ans,cur_sum*l+suf_sum[i+1]*r+abs(n-3-2*i)*qr);
			}
			// cout<<ans<<".\n";
		}
		cout<<ans<<endl;

	}

	return 0;
}


/* Akshat Sharma @akshat98 */
#include <iostream>
#include <bits/stdc++.h>
#define IOS  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define mp   make_pair
#define pb   push_back
#define F    first
#define S    second
#define ll   long long
#define MOD  1000000007
#define MAX  1000000001
#define vi 	 vector<int>
#define vl   vector<ll>
#define vpi  vector<pair<int,int> >
#define vpl  vector<pair<ll,ll> >
#define rep(i,a,b) for(i=a;i<b;i++)
#define reqp(i,a,b) for(i=a;i<=b;i++)
#define ren for(i=0;i<n;i++)
#define ALL(a)  (a).begin(),(a).end()
using namespace std;
typedef pair<int,int>pii;
typedef pair<ll,ll>pll;

int main()
{
	#ifndef ONLINE_JUDGE
	freopen("input_file.txt", "r", stdin);
	//freopen("output_file.txt", "w", stdout);
	#endif
	int i,j,k,l,n,test_case,m,r,ql,qr,sum;
	test_case=1;
	//cin>>test_case;
	while(test_case--){
		cin>>n>>l>>r>>ql>>qr;
		vi vec(n);
		ren cin>>vec[i],sum+=vec[i];
		ll ans=sum*r+qr*(n-1);
		ll suf_sum[100005]{};
		for(i=n-1;i>=0;i--){
			suf_sum[i]=vec[i]+suf_sum[i+1];
		}
		ll cur_sum=0;
		rep(i,0,n){
			cur_sum+=vec[i];
			if(i+1>n-1-i){
				ans=min(ans,cur_sum*l+suf_sum[i+1]*r+abs(2*i+1-n)*ql);
			}else if(i+1==n-1-i){
				ans=min(ans,cur_sum*l+suf_sum[i+1]*r);
			}else{
				ans=min(ans,cur_sum*l+suf_sum[i+1]*r+abs(2*i+1-n)*qr);
			}
			// cout<<ans<<".\n";
		}
		cout<<ans<<endl;

	}

	return 0;
}


#include<bits/stdc++.h>
#define tr(v,it) for(auto it=v.begin();it!=v.end();it++)
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define F first
#define S second
#define endl "\n"
#define mod 1000000007
#define pi 3.141592653589793
#define INF 1e18

using namespace std;

int main()
{
//freopen("input.txt","r",stdin);
ios::sync_with_stdio(0);
cin.tie(0);

long long n,l,r,ql,qr;
cin>>n>>l>>r>>ql>>qr;
vector<long long>lsum(n),rsum(n);
vector<long long>w(n);
for(int i=0;i<n;i++)
{cin>>w[i];
if(i==0)
lsum[i]+=w[i];
else
lsum[i]=lsum[i-1]+w[i];
}

for(int i=n-1;i>=0;i--)
{
	if(i==n-1)
	rsum[i]=0;
	else
	rsum[i]=rsum[i+1]+w[i+1];
	//cout<<rsum[i]<<" ";
}

long long ans=INF;

for(int i=1;i<=n;i++)
{
	long long curr=lsum[i-1]*l+rsum[i-1]*r;
	//cout<<curr<<" ";
	if(i>n-i)curr+=(i-(n-i+1))*ql;
	if(i<n-i)curr+=(n-i-(i+1))*qr;
//cout<<curr<<endl;
ans=min(ans,curr);
}

cout<<ans;

	return 0;
}


#include<bits/stdc++.h>
#define tr(v,it) for(auto it=v.begin();it!=v.end();it++)
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define F first
#define S second
#define endl "\n"
#define mod 1000000007
#define pi 3.141592653589793
#define INF 1e18

using namespace std;

int main()
{
//freopen("input.txt","r",stdin);
ios::sync_with_stdio(0);
cin.tie(0);

long long n,l,r,ql,qr;
cin>>n>>l>>r>>ql>>qr;
vector<long long>lsum(n),rsum(n);
vector<long long>w(n);
for(int i=0;i<n;i++)
{cin>>w[i];
if(i==0)
lsum[i]+=w[i];
else
lsum[i]=lsum[i-1]+w[i];
}

for(int i=n-1;i>=0;i--)
{
	if(i==n-1)
	rsum[i]=0;
	else
	rsum[i]=rsum[i+1]+w[i+1];
	//cout<<rsum[i]<<" ";
}

long long ans=INF;
if(n==1)
{
	cout<<min(w[0]*l,w[0]*r);
	return 0;
}

ans=rsum[0]*r+(n)*qr;

for(int i=1;i<=n;i++)
{
	long long curr=lsum[i-1]*l+rsum[i-1]*r;
//	cout<<curr<<" ";
	if(i>n-i)curr+=(i-(n-i+1))*ql;
	if(i<n-i)curr+=(n-i-(i+1))*qr;
//cout<<curr<<endl;
ans=min(ans,curr);
}

cout<<ans;

	return 0;
}


#include<bits/stdc++.h>
#define tr(v,it) for(auto it=v.begin();it!=v.end();it++)
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define F first
#define S second
#define endl "\n"
#define mod 1000000007
#define pi 3.141592653589793
#define INF 1e18

using namespace std;

int main()
{
//freopen("input.txt","r",stdin);
ios::sync_with_stdio(0);
cin.tie(0);

long long n,l,r,ql,qr;
cin>>n>>l>>r>>ql>>qr;
vector<long long>lsum(n),rsum(n);
vector<long long>w(n);
for(int i=0;i<n;i++)
{cin>>w[i];
if(i==0)
lsum[i]+=w[i];
else
lsum[i]=lsum[i-1]+w[i];
}

for(int i=n-1;i>=0;i--)
{
	if(i==n-1)
	rsum[i]=0;
	else
	rsum[i]=rsum[i+1]+w[i+1];
	//cout<<rsum[i]<<" ";
}

long long ans=INF;

if(n==1)
{
	cout<<min(w[0]*l,w[0]*r);
	return 0;
}

for(int i=1;i<=n;i++)
{
	long long curr=lsum[i-1]*l+rsum[i-1]*r;
	//cout<<curr<<" ";
	if(i>n-i)curr+=(i-(n-i+1))*ql;
	if(i<n-i)curr+=(n-i-(i+1))*qr;
//cout<<curr<<endl;
ans=min(ans,curr);
}

cout<<ans;

	return 0;
}


#include<bits/stdc++.h>
#define tr(v,it) for(auto it=v.begin();it!=v.end();it++)
#define mp(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define F first
#define S second
#define endl "\n"
#define mod 1000000007
#define pi 3.141592653589793
#define INF 1e18

using namespace std;

int main()
{
//freopen("input.txt","r",stdin);
ios::sync_with_stdio(0);
cin.tie(0);

long long n,l,r,ql,qr;
cin>>n>>l>>r>>ql>>qr;
vector<long long>lsum(n),rsum(n);
vector<long long>w(n);
for(int i=0;i<n;i++)
{cin>>w[i];
if(i==0)
lsum[i]+=w[i];
else
lsum[i]=lsum[i-1]+w[i];
}

for(int i=n-1;i>=0;i--)
{
	if(i==n-1)
	rsum[i]=0;
	else
	rsum[i]=rsum[i+1]+w[i+1];
	//cout<<rsum[i]<<" ";
}

long long ans=INF;
if(n==1)
{
	cout<<min(w[0]*l,w[0]*r);
	return 0;
}
//cout<<rsum[0]+w[0]<<" ";
ans=(rsum[0]+w[0])*r+(n-1)*qr;

for(int i=1;i<=n;i++)
{
	long long curr=lsum[i-1]*l+rsum[i-1]*r;
//	cout<<curr<<" ";
	if(i>n-i)curr+=(i-(n-i+1))*ql;
	if(i<n-i)curr+=(n-i-(i+1))*qr;
//cout<<curr<<endl;
ans=min(ans,curr);
}

cout<<ans;

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define FOR(i,n) for (int i=1;i<=n;i++)
#define REP(i,a,b) for (int i=a;i<=b;i++)

#define pb push_back

typedef long long ll;

const int inf=0x3f3f3f3f;
const int N=1000000+10;

int n;
int l,r,q1,q2;
int a[N];
int sum[N];
int ans=inf;
int main() {

	std::ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	cin>>n>>l>>r>>q1>>q2;
	FOR(i,n) cin>>a[i];
	FOR(i,n) sum[i]=sum[i-1]+a[i];
	REP(i,0,n) {
		int t=n-2*i;
		if (t>=0) {
			ans=min(ans,l*(sum[i])+r*(sum[n]-sum[i])+(t-1)*q2);
		} else {
			t=-t;
			ans=min(ans,l*(sum[i])+r*(sum[n]-sum[i])+(t-1)*q1);
		}
	}
	cout<<ans<<endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define FOR(i,n) for (int i=1;i<=n;i++)
#define REP(i,a,b) for (int i=a;i<=b;i++)

#define pb push_back

typedef long long ll;

const int inf=0x3f3f3f3f;
const int N=1000000+10;

int n;
int l,r,q1,q2;
int a[N];
int sum[N];
int ans=inf;
int main() {

	std::ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	cin>>n>>l>>r>>q1>>q2;
	FOR(i,n) cin>>a[i];
	FOR(i,n) sum[i]=sum[i-1]+a[i];
	REP(i,0,n) {
		int t=n-2*i;
		if (t>=0) {
			if (t==0) t=1;
			ans=min(ans,l*(sum[i])+r*(sum[n]-sum[i])+(t-1)*q2);
		} else {
			t=-t;
			ans=min(ans,l*(sum[i])+r*(sum[n]-sum[i])+(t-1)*q1);
		}
	}
	cout<<ans<<endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define FOR(i,n) for (int i=1;i<=n;i++)
#define REP(i,a,b) for (int i=a;i<=b;i++)

#define pb push_back

typedef long long ll;

const int inf=0x3f3f3f3f;
const int N=1000000+10;

int n;
int l,r,q1,q2;
int a[N];
int sum[N];
int ans=inf;
int main() {

	std::ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	cin>>n>>l>>r>>q1>>q2;
	FOR(i,n) cin>>a[i];
	FOR(i,n) sum[i]=sum[i-1]+a[i];
	REP(i,0,n) {
		int t=n-2*i;
		if (t>=0) {
			ans=min(ans,l*(sum[i])+r*(sum[n]-sum[i])+t*q2);
		} else {
			t=-t;
			ans=min(ans,l*(sum[i])+r*(sum[n]-sum[i])+t*q1);
		}
	}
	cout<<ans<<endl;
	return 0;
}


// Template begins
#include<bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define endl "\n"
#define lb lower_bound
#define ub upper_bound
#define fo(i,a,b) for(i=a;i<=b;i++)
#define all(v) (v).begin()+1,(v).end()
#define sort0(v) sort(all(v))
#define lbb(a,b,arr,x) lower_bound(arr+a,arr+b+1,x)-arr
#define ubb(a,b,arr,x) upper_bound(arr+a,arr+b+1,x)-arr
#define freq(a,b,arr,x) upper_bound(arr+a,arr+b+1,x)-lower_bound(arr+a,arr+b+1,x)
typedef pair<ll,ll> pii;
typedef pair<ll,ll> pll;
#define d0(x) cout<<(x)<<" "
#define d1(x) cout<<(x)<<endl
#define d2(x,y) cout<<(x)<<" "<<(y)<<endl
#define d3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<endl
#define d4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<endl
#define d5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<endl
#define d6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<endl
#define max3(a,b,c) max(max((a),(b),(c)))
#define max4(a,b,c,d) max(max((a),(b)),max((c),(d)))
#define ss second
#define ff first
#define pb push_back
#define mp make_pair
template<class T> ostream& operator<<(ostream &os, vector<T> V) {
    for(auto v : V) os << v << " ";
    return cout << "";
}
template<class T> ostream& operator<<(ostream &os, set<T> S){
    for(auto s:S) os<<s<<" ";
    return cout << "";
}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
    return os << P.first << " " << P.second;
}
#define inf 999999999999
#define eps 0.0000001
#define PI 3.1415926535
#define dbl double
ll mod=998244353;

// Template ends

ll i,j,f2,t,k,d,f,b,n,a,l,r,q1,q2,x,y,arr[200200],lsum[200200],rsum[200200];
int main() {
  fio;
  t=1;
  //cin>>t;
  while(t--){
    cin>>n>>l>>r>>q1>>q2;
    fo(i,1,n) cin>>arr[i];
    lsum[0]=0;  rsum[n+1]=0;
    fo(i,1,n){
      lsum[i]=lsum[i-1]+arr[i];
    }
    for(i=n;i>=1;i--){
      rsum[i]=rsum[i+1]+arr[i];
    }
    ll ans=inf;
    fo(i,0,n){
      ll minn=0;
      minn+=(lsum[i]*l+rsum[i+1]*r);
      if(2*i<n){
        minn+=(n-2*i-1)*q2;
      }
      if(2*i>n){
        minn+=(-n+2*i-1)*q1;
      }
      if(2*i==n){
        //minn+=0;
      }
      ans=min(ans,minn);
      //cout<<ans<<"..";
    }
    cout<<ans;
  }
}


// Template begins
#include<bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define endl "\n"
#define lb lower_bound
#define ub upper_bound
#define fo(i,a,b) for(i=a;i<=b;i++)
#define all(v) (v).begin()+1,(v).end()
#define sort0(v) sort(all(v))
#define lbb(a,b,arr,x) lower_bound(arr+a,arr+b+1,x)-arr
#define ubb(a,b,arr,x) upper_bound(arr+a,arr+b+1,x)-arr
#define freq(a,b,arr,x) upper_bound(arr+a,arr+b+1,x)-lower_bound(arr+a,arr+b+1,x)
typedef pair<ll,ll> pii;
typedef pair<ll,ll> pll;
#define d0(x) cout<<(x)<<" "
#define d1(x) cout<<(x)<<endl
#define d2(x,y) cout<<(x)<<" "<<(y)<<endl
#define d3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<endl
#define d4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<endl
#define d5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<endl
#define d6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<endl
#define max3(a,b,c) max(max((a),(b),(c)))
#define max4(a,b,c,d) max(max((a),(b)),max((c),(d)))
#define ss second
#define ff first
#define pb push_back
#define mp make_pair
template<class T> ostream& operator<<(ostream &os, vector<T> V) {
    for(auto v : V) os << v << " ";
    return cout << "";
}
template<class T> ostream& operator<<(ostream &os, set<T> S){
    for(auto s:S) os<<s<<" ";
    return cout << "";
}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
    return os << P.first << " " << P.second;
}
#define inf 999999999999
#define eps 0.0000001
#define PI 3.1415926535
#define dbl double
ll mod=998244353;

// Template ends

ll i,j,f2,t,k,d,f,b,n,a,l,r,q1,q2,x,y,arr[200200],lsum[200200],rsum[200200];
int main() {
  fio;
  t=1;
  //cin>>t;
  while(t--){
    cin>>n>>l>>r>>q1>>q2;
    fo(i,1,n) cin>>arr[i];
    lsum[0]=0;  rsum[n+1]=0;
    fo(i,1,n){
      lsum[i]=lsum[i-1]+arr[i];
    }
    for(i=n;i>=1;i--){
      rsum[i]=rsum[i+1]+arr[i];
    }
    if(n==1){
      cout<<arr[1]*min(l,r);
      return 0;
    }
    ll ans=inf;
    fo(i,1,n){
      ll minn=0;
      if(i<=n/2){
        minn+=i*(lsum[i]*l+rsum[n+1-i]*r);
        minn+=(rsum[i+1]-rsum[n+1-i])*r+max(q2*(n-2*i-1),0LL);
        ans=min(ans,minn);
      }
      else{
        j=n-i;
        minn+=j*(lsum[j]*l+rsum[n+1-j]*r);
        minn+=(rsum[j+1]-rsum[n+1-j])*r+max(q2*(n-2*j-1),0LL);
        ans=min(ans,minn);
      }
      //cout<<ans<<"\n";
    }
    cout<<ans;
  }
}


// Template begins
#include<bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ll long long
#define endl "\n"
#define lb lower_bound
#define ub upper_bound
#define fo(i,a,b) for(i=a;i<=b;i++)
#define all(v) (v).begin()+1,(v).end()
#define sort0(v) sort(all(v))
#define lbb(a,b,arr,x) lower_bound(arr+a,arr+b+1,x)-arr
#define ubb(a,b,arr,x) upper_bound(arr+a,arr+b+1,x)-arr
#define freq(a,b,arr,x) upper_bound(arr+a,arr+b+1,x)-lower_bound(arr+a,arr+b+1,x)
typedef pair<ll,ll> pii;
typedef pair<ll,ll> pll;
#define d0(x) cout<<(x)<<" "
#define d1(x) cout<<(x)<<endl
#define d2(x,y) cout<<(x)<<" "<<(y)<<endl
#define d3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<endl
#define d4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<endl
#define d5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<endl
#define d6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<endl
#define max3(a,b,c) max(max((a),(b),(c)))
#define max4(a,b,c,d) max(max((a),(b)),max((c),(d)))
#define ss second
#define ff first
#define pb push_back
#define mp make_pair
template<class T> ostream& operator<<(ostream &os, vector<T> V) {
    for(auto v : V) os << v << " ";
    return cout << "";
}
template<class T> ostream& operator<<(ostream &os, set<T> S){
    for(auto s:S) os<<s<<" ";
    return cout << "";
}
template<class L, class R> ostream& operator<<(ostream &os, pair<L,R> P) {
    return os << P.first << " " << P.second;
}
#define inf 999999999999
#define eps 0.0000001
#define PI 3.1415926535
#define dbl double
ll mod=998244353;

// Template ends

ll i,j,f2,t,k,d,f,b,n,a,l,r,q1,q2,x,y,arr[200200],lsum[200200],rsum[200200];
int main() {
  fio;
  t=1;
  //cin>>t;
  while(t--){
    cin>>n>>l>>r>>q1>>q2;
    fo(i,1,n) cin>>arr[i];
    lsum[0]=0;  rsum[n+1]=0;
    fo(i,1,n){
      lsum[i]=lsum[i-1]+arr[i];
    }
    for(i=n;i>=1;i--){
      rsum[i]=rsum[i+1]+arr[i];
    }
    ll ans=inf;
    fo(i,1,n){
      ll minn=0;
      if(i<=n/2){
        minn+=i*(lsum[i]*l+rsum[n+1-i]*r);
        minn+=(rsum[i+1]-rsum[n+1-i])*r+max(q2*(n-2*i-1),0LL);
        ans=min(ans,minn);
      }
      else{
        j=n-i;
        minn+=j*(lsum[j]*l+rsum[n+1-j]*r);
        minn+=(rsum[j+1]-rsum[n+1-j])*r+max(q2*(n-2*j-1),0LL);
        ans=min(ans,minn);
      }
      //cout<<ans<<"\n";
    }
    cout<<ans;
  }
}