After finding and moving to the new planet that supports human life, discussions started on which currency should be used. After long negotiations, Bitcoin was ultimately chosen as the universal currency.

These were the great news for Alice, whose grandfather got into Bitcoin mining in 2013, and accumulated a lot of them throughout the years. Unfortunately, when paying something in bitcoin everyone can see how many bitcoins you have in your public address wallet. 

This worried Alice, so she decided to split her bitcoins among multiple different addresses, so that every address has at most x satoshi (1 bitcoin = 10^8 satoshi). She can create new public address wallets for free and is willing to pay f fee in satoshi per transaction to ensure acceptable speed of transfer. The fee is deducted from the address the transaction was sent from. Tell Alice how much total fee in satoshi she will need to pay to achieve her goal.

Input

First line contains number N (1 ≤ N ≤ 200 000) representing total number of public addresses Alice has.

Next line contains N integer numbers a_i (1 ≤ a_i ≤ 10^9) separated by a single space, representing how many satoshi Alice has in her public addresses.

Last line contains two numbers x, f (1 ≤ f < x ≤ 10^9) representing maximum number of satoshies Alice can have in one address, as well as fee in satoshies she is willing to pay per transaction. 

Output

Output one integer number representing total fee in satoshi Alice will need to pay to achieve her goal.

Example

Input

3
13 7 6
6 2


Output

4

Note

Alice can make two transactions in a following way:

0. 13 7 6 (initial state)

1. 6 7 6 5 (create new address and transfer from first public address 5 satoshies)

2. 6 4 6 5 1 (create new address and transfer from second address 1 satoshi)

Since cost per transaction is 2 satoshies, total fee is 4.
//package math_codet;

import java.io.*;
import java.util.*;
 /******************************************
*    AUTHOR:         AMAN KUMAR SINGH        *
*    INSTITUITION:   KALYANI GOVERNMENT ENGINEERING COLLEGE  *
******************************************/
public class lets_do {
    InputReader in;
    PrintWriter out;
    Helper_class h;
    final long mod=1000000007;
    public static void main(String[] args) throws java.lang.Exception{
        new lets_do().run();
    }
    void run() throws Exception{
        in=new InputReader();
        out = new PrintWriter(System.out);
        h = new Helper_class();
        int t = 1;
        while(t-->0)
            solve();
        out.flush();    
        out.close();
    }
    
    void solve(){
        int n = h.ni();
        long[] arr = new long[n];
        int i = 0;
        for(i = 0; i < n; i++)
            arr[i] = h.nl();
        long x = h.nl();
        long f = h.nl();
        long cost = 0;
        for(i = 0; i < n; i++){
            if(arr[i] > x){
                arr[i] -= x;
                long p = arr[i]/(x + f);
                cost += p * f;
                arr[i] -= (x + f) * p;
                if(arr[i] > 0)
                    cost += f;
            }
        }
        h.pn(cost);
    }
    /*void add_map(int x){
        Integer xx = tmap.get(x);
        if(xx == null)
            tmap.put(x, 1);
        else
            tmap.put(x, ++x);
    }
    void remove_map(int x){
        Integer xx = tmap.get(x);
        if(xx == 1)
            tmap.remove(x);
        else
            tmap.put(x, --xx);
    }*/
    final Comparator<Entity> com=new Comparator<Entity>(){
        public int compare(Entity x, Entity y){
            int xx=Integer.compare(y.b, x.b);
            if(xx==0){
                int xxx=Integer.compare(x.a,y.a);
                return xxx;
            }
            else
                return xx;
        }
    };
    class Entity{
        int a;
        int b;
        Entity(int p, int q){
            a=p;
            b=q;
        }
    }
    class Helper_class{
        long gcd(long a, long b){return (b==0)?a:gcd(b,a%b);}
        int gcd(int a, int b){return (b==0)?a:gcd(b,a%b);}
        int bitcount(long n){return (n==0)?0:(1+bitcount(n&(n-1)));}
        void p(Object o){out.print(o);}
        void pn(Object o){out.println(o);}
        void pni(Object o){out.println(o);out.flush();}
        String n(){return in.next();}
        String nln(){return in.nextLine();}
        int ni(){return Integer.parseInt(in.next());}
        long nl(){return Long.parseLong(in.next());}
        double nd(){return Double.parseDouble(in.next());}

        long mul(long a,long b){
            if(a>=mod)a%=mod;
            if(b>=mod)b%=mod;
            a*=b;
            if(a>=mod)a%=mod;
            return a;
        }
        long modPow(long a, long p){
            long o = 1;
            while(p>0){
                if((p&1)==1)o = mul(o,a);
                a = mul(a,a);
                p>>=1;
            }
            return o;
        }
        long add(long a, long b){
            if(a>=mod)a%=mod;
            if(b>=mod)b%=mod;
            if(b<0)b+=mod;
            a+=b;
            if(a>=mod)a-=mod;
            return a;
        }
    }

    class InputReader{
        BufferedReader br;
        StringTokenizer st;
        public InputReader(){
            br = new BufferedReader(new InputStreamReader(System.in));
        }
 
        public InputReader(String s) throws Exception{
            br = new BufferedReader(new FileReader(s));
        }
 
        String next(){
            while (st == null || !st.hasMoreElements()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (IOException  e){
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        String nextLine(){
            String str = "";
            try{
                str = br.readLine();
            }catch (IOException e){
                e.printStackTrace();
            }   
            return str;
        }
    }
}       