#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;

signed main() {
#ifdef LOCAL
  assert(freopen("d.in", "r", stdin));
#endif
  int n, a, b;
  cin >> n >> a >> b;
  vector<int> p(n + 1);
  vector<int> pos(n + 1);
  for (int i = 0; i < n; ++i) {
    cin >> p[i];
    --p[i];
    pos[p[i]] = i;
  }
  p[n] = pos[n] = n;
  vector<ll> d(n + 1);
  for (int i = 0; i < n + 1; ++i) {
    d[i] = 1e18;
    ll cost = 0;
    for (int j = i - 1; j >= 0; --j) {
      if (pos[j] < pos[i]) {
        d[i] = min(d[i], d[j] + cost);
        cost += a;
      } else {
        cost += b;
      }
    }
    d[i] = min(d[i], cost);
  }
  cout << d[n] << '\n';
}
