#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll maxn=5050;
const ll INF=1e15;
ll a[maxn][maxn],dp[maxn],p[maxn],n,A,B;

int main(){
    cin >> n >> A >> B;
    for (int i=1;i<=n;i++) cin >> p[i];
    p[++n]=n+1;
    for (int i=0;i<=n;i++){
        a[i][i]=0;
        for (int j=i+1;j<=n;j++) a[i][j]=a[i][j-1]+(p[j]>p[i]?A:B);
    }
    for (int i=1;i<=n;i++){
        dp[i]=INF;
        for (int j=0;j<i;j++) if (p[j]<p[i]) dp[i]=min(dp[i],dp[j]+a[j][i-1]);
    }
    cout << dp[n] << endl;
    return 0;
}
