N,A,B=list(map(int,input().split()))

P=[int(i) for i in input().split()]

dp=[10**19]*(N+1)

dp[0]=0

for i in range(1,N+1):

    ndp=[10**19]*(N+1)

    for j in range(N+1):

        if j < P[i-1]:

            ndp[P[i-1]]=min(ndp[P[i-1]],dp[j])

            ndp[j]=min(ndp[j],dp[j]+A)

        else:

            ndp[j]=min(ndp[j],dp[j]+B)

    dp=ndp

print((min(dp)))

N,A,B=list(map(int,input().split()))

P=[int(i) for i in input().split()]

s=1e19

d=[s]*(N+1)

d[0]=0

for i in range(N):

    e=[s]*(N+1)

    for j in range(N+1):

        if j < P[i]:

            e[P[i]]=min(e[P[i]],d[j])

            e[j]=min(e[j],d[j]+A)

        else:

            e[j]=min(e[j],d[j]+B)

    d=e

print((min(d)))

N, A, B = list(map(int, input().split()))
P = [int(i) for i in input().split()]
dp = [10**19] * (N + 1)
dp[0] = 0
for i in range(1, N + 1):
    ndp = [10**19] * (N + 1)
    for j in range(N + 1):
        if j < P[i - 1]:
            ndp[P[i - 1]] = min(ndp[P[i - 1]], dp[j])
            ndp[j] = min(ndp[j], dp[j] + A)
        else:
            ndp[j] = min(ndp[j], dp[j] + B)
    dp = ndp
print((min(dp)))

N, A, B = list(map(int, input().split()))
P = [int(i) for i in input().split()]
s = 1e19
d = [s] * (N + 1)
d[0] = 0
for i in range(N):
    e = [s] * (N + 1)
    for j in range(N + 1):
        if j < P[i]:
            e[P[i]] = min(e[P[i]], d[j])
            e[j] = min(e[j], d[j] + A)
        else:
            e[j] = min(e[j], d[j] + B)
    d = e
print((min(d)))

-dp = [10**19] * (N + 1) -dp[0] = 0 -for i in range(1, N + 1): -    ndp = [10**19] * (N + 1) +s = 1e19 +d = [s] * (N + 1) +d[0] = 0 +for i in range(N): +    e = [s] * (N + 1) -        if j < P[i - 1]: -            ndp[P[i - 1]] = min(ndp[P[i - 1]], dp[j]) -            ndp[j] = min(ndp[j], dp[j] + A) +        if j < P[i]: +            e[P[i]] = min(e[P[i]], d[j]) +            e[j] = min(e[j], d[j] + A) -            ndp[j] = min(ndp[j], dp[j] + B) -    dp = ndp -print((min(dp))) +            e[j] = min(e[j], d[j] + B) +    d = e +print((min(d)))