#include<bits/stdc++.h> #define int long long #define fst first #define snd second #define re register
usingnamespace std;
typedef pair<int,int> pii; constint N = 2e5 + 10,inf = 1e18 + 10; int n,x,y,ans = inf; int arr[N],sp[N],sn[N];//sp 为前缀和,sn 为后缀和 pii mx[N];
inlineintread(){ int r = 0,w = 1; char c = getchar(); while (c < '0' || c > '9'){ if (c == '-') w = -1; c = getchar(); } while (c >= '0' && c <= '9'){ r = (r << 3) + (r << 1) + (c ^ 48); c = getchar(); } return r * w; }
signedmain(){ n = read(); x = read(); y = read(); for (re int i = 1;i <= n;i++){ arr[i] = read(); sp[i] = sp[i - 1] + arr[i]; } for (re int i = n;i;i--) sn[i] = sn[i + 1] + arr[i]; mx[n + 1] = {0,n + 1}; for (re int i = n;i;i--){ int t = sn[i] - (n - i + 1) * y; if (mx[i + 1].fst < t) mx[i] = {t,i}; else mx[i] = mx[i + 1]; } for (re int i = 0;i <= n;i++){ int id = mx[i + 1].snd; int sum = sp[id - 1] - sp[i] + i * x + (n - id + 1) * y; ans = min(ans,sum); } printf("%lld",ans); return0; }