In a time not too far away from now Earth became highly contaminated with garbage and a corporation called Buy-N-Large evacuated its people on giant starliners. It also left behind various WALL-E robots to clean the planet. But several years later only one of the robot survived and found a small plant growing in a shoe. One day WALL-E shows this plant to EVE, and both of them pretty excited return to EVE's mothership, the starliner Axiom. Now they must transport the people on the Axiom back to Earth. But there is a small problem. On their way back from the Axiom to Earth, there are N points and one cannot cross these N points for b seconds after regular intervals of a seconds . That is, beginning from time instant 0 any of these N points can be crossed upto instant a-1 but they cannot be crossed from instant a to a+b-1 and if a person arrives from instant a to (a+b-1) then he/she must wait and can only restart their journey from instant a+b. This process again repeats from the (a+b)th instant. Let us call these N points p1, p2 . . . pN. WALL-E has already computed the time that is required to move between the points that is from pi to pi+1 such that 1<= i <= N-1, from the Axiom and p1 and from pN to the Earth. Now he gives you the starting times of Q people and you have to supply him with the sum of the instants when these people reach Earth.
Input Format
The first line of input contains 3 numbers N, a and b. The second line contains N+1 integers. The first integer is the time taken to reach from the Axiom to p1, followed by N-1 integers to go from pi to pi+1, 1<= i <= N-1, followed by the time to reach from pN to the Earth. The third line contains Q, the number of queries. The ith of the next Q lines contains one a single integer qi, the starting time of the ith person.
Output Format
The output should contain a single integer denoting the sum of the time instants when each of the Q people reach Earth.
Constraints
1<= N,Q <= 105
1<= a,b,qi <= 105
The first person starts at instant 5 from the Axiom and reaches p1 at instant 6 . He can cross p1 at this instant so he moves further and reaches p2 at instant 10, again he is allowed to cross it then. So he reaches Earth at instant 12.
Now the second person starts at instant 3 and reaches p1 at instant 4. He must wait at p1 till instant 6 when he restarts his journey to reach p2 at instant 10. Again he can cross p2 now, so he finally reaches Earth at instant 12.
The sum of the two time instants gives the final answer 24.