#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define N 5010
#define inf 1000000000000000ll
int n,A,B; ll f[N][N<<1];
struct data { int x,y; bool operator <(const data&a) const { return x<a.x||x==a.x&&y<a.y; } }a[N];
signed main() {
	scanf("%d%d%d",&n,&A,&B); for (int i=1;i<=n;i++) scanf("%d",&a[i].x),a[i].y=i;
    sort(a+1,a+n+1);
    for (int i=1;i<=n;i++){ll s=inf;for(int j=0;j<=n*2;j++){s=min(s,f[i-1][j]);if(j&1){f[i][j]=s+((j+1>>1)==a[i].y?0:((j+1>>1)<a[i].y?B:A));}else{f[i][j]=s+(((j>>1)<a[i].y?B:A));}}}
    ll ans=inf;
    for (int i=0;i<=n*2;i++) ans=min(ans,f[n][i]);
    cout<<ans;
    return 0;
}