#include <bits/stdc++.h>
using namespace std;long long n,aa,i,j,b,f[5005],pos[5005],ans,a[5005],c[5005];int main(){ans=12345678912345678ll;cin>>n>>aa>>b;for (i=1;i<=n;i++) f[i]=ans;for (i=1;i<=n;i++){	cin>>a[i];pos[a[i]]=i;	}	for (i=1;i<=n;i++){		c[i]=c[i-1]+(i<a[i]?aa:b);	}	for (i=1;i<=n;i++){		long long s=0;		for (j=i-1;j>=0;j--){			if (a[j]<a[i]){				f[i]=min(f[i],f[j]+s);			}			if (a[j]<a[i]){				s+=b;			} else {				s+=aa;			}		}		ans=min(ans,f[i]+(n-i)*b);	}	cout<<ans<<endl;return 0;}