mmorpg-dota2-4

Oz plays popular MMORPG Dota2. Invoker is one of the favourite Oz's heroes. Oz's skills are not perfect yet, so he uses only two spells - SunStrike and Tornado. Each of these spells takes some mana points to cast and may be used several times. Oz uses the spells to kill neutral creeps in the map. The creeps are placed at line OX, you may assume that each creep is a single point on the line. 
When Oz uses SunStrike, he kills all creeps placed on single point. When Tornado is used then it kills all creeps on a line segment (including creeps placed on the ends of the segment). Oz may cast spells in arbitrary order and may use them at any place of the line, however the length of Tornado segment is fixed. Help Oz to Find, what is the minimum amount of mana points he should spend to kill all the creeps. 

Input :
The first line contains three integers Ms,Mt and Lt - Number of mana points a single SunStrike takes, Number of mana points a single Tornado takes and length of Tornado segment. The second line contains a single integer N - amount of creeps in the line. The next line contains N non-negative integers x1,x2,...,xN - coordinates of creeps on the line.

Output :
Output a single number - minimal amount of mana points necessary to kill all the creeps.

Constraints :
1 ≤ Ms, Mt, Lt ≤ 100 
1 ≤ N ≤ 100 
0 ≤ x1,x2,...,xN ≤ 1000

SAMPLE INPUT
2 3 3
3
1 3 5

SAMPLE OUTPUT
5

Source: hackerearth | Difficulty: EASY


Solutions: