#abc044a. [abc044_a]Tak and Hotels (ABC Edit)

[abc044_a]Tak and Hotels (ABC Edit)

Problem Statement

There is a hotel with the following accommodation fee:

  • XX yen (the currency of Japan) per night, for the first KK nights
  • YY yen per night, for the (K+1)(K+1)-th and subsequent nights

Tak is staying at this hotel for NN consecutive nights. Find his total accommodation fee.

Constraints

  • 1leqN,Kleq100001 \\leq N, K \\leq 10000
  • 1leqY<Xleq100001 \\leq Y < X \\leq 10000
  • N,,K,,X,,YN,\\,K,\\,X,\\,Y are integers.

Input

The input is given from Standard Input in the following format:

NN KK XX YY

Output

Print Tak's total accommodation fee.


Sample Input 1

5
3
10000
9000

Sample Output 1

48000

The accommodation fee is as follows:

  • 1000010000 yen for the 11-st night
  • 1000010000 yen for the 22-nd night
  • 1000010000 yen for the 33-rd night
  • 90009000 yen for the 44-th night
  • 90009000 yen for the 55-th night

Thus, the total is 4800048000 yen.


Sample Input 2

2
3
10000
9000

Sample Output 2

20000