import numpy as np

N,A,B,*P=list(map(int,open(0).read().split()))

dp=np.full(N+1,10**18,np.int64)

dp[0]=0

for p in P:

    dp[p]=min(dp[:p])

    dp[p+1:]+=B

    dp[:p]+=A

print((min(dp)))
from numpy import *

N,A,B,*P=list(map(int,open(0).read().split()));d=full(N+1,1<<60,'int');d[0]=0

for p in P:d[p]=min(d[:p]);d[p+1:]+=B;d[:p]+=A

print((min(d)))
import numpy as np

N, A, B, *P = list(map(int, open(0).read().split()))
dp = np.full(N + 1, 10**18, np.int64)
dp[0] = 0
for p in P:
    dp[p] = min(dp[:p])
    dp[p + 1 :] += B
    dp[:p] += A
print((min(dp)))

from numpy import *

N, A, B, *P = list(map(int, open(0).read().split()))
d = full(N + 1, 1 << 60, "int")
d[0] = 0
for p in P:
    d[p] = min(d[:p])
    d[p + 1 :] += B
    d[:p] += A
print((min(d)))

-import numpy as np +from numpy import * -dp = np.full(N + 1, 10**18, np.int64) -dp[0] = 0 +d = full(N + 1, 1 << 60, "int") +d[0] = 0 -    dp[p] = min(dp[:p]) -    dp[p + 1 :] += B -    dp[:p] += A -print((min(dp))) +    d[p] = min(d[:p]) +    d[p + 1 :] += B +    d[:p] += A +print((min(d)))