#abc263d. [abc263_d]Left Right Operation

[abc263_d]Left Right Operation

Problem Statement

You are given an integer sequence of length NN: A=(A1,A2,ldots,AN)A=(A_1,A_2,\\ldots,A_N).

You will perform the following consecutive operations just once:

  • Choose an integer xx (0leqxleqN)(0\\leq x \\leq N). If xx is 00, do nothing. If xx is 11 or greater, replace each of A1,A2,ldots,AxA_1,A_2,\\ldots,A_x with LL.

  • Choose an integer yy (0leqyleqN)(0\\leq y \\leq N). If yy is 00, do nothing. If yy is 11 or greater, replace each of AN,AN1,ldots,ANy+1A_{N},A_{N-1},\\ldots,A_{N-y+1} with RR.

Print the minimum possible sum of the elements of AA after the operations.

Constraints

  • 1leqNleq2times1051 \\leq N \\leq 2\\times 10^5
  • \-109leqL,Rleq109\-10^9 \\leq L, R\\leq 10^9
  • \-109leqAileq109\-10^9 \\leq A_i\\leq 10^9
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN LL RR A1A_1 A2A_2 ldots\\ldots ANA_N

Output

Print the answer.


Sample Input 1

5 4 3
5 5 0 6 3

Sample Output 1

14

If you choose x=2x=2 and y=2y=2, you will get A=(4,4,0,3,3)A = (4,4,0,3,3), for the sum of 1414, which is the minimum sum achievable.


Sample Input 2

4 10 10
1 2 3 4

Sample Output 2

10

If you choose x=0x=0 and y=0y=0, you will get A=(1,2,3,4)A = (1,2,3,4), for the sum of 1010, which is the minimum sum achievable.


Sample Input 3

10 -5 -3
9 -6 10 -1 2 10 -1 7 -15 5

Sample Output 3

-58

LL, RR, and AiA_i may be negative.