/* Be strong, be fearless, be beautiful :D
And believe that anything is possible :))
when you have the right people there
to support you :) */
//RTn_E
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define _Sync ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define _file freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define ll long long
#define ld long double
#define sp setprecision
#define pb push_back
#define F first
#define S second
#define mk make_pair
#define pii pair < int , int >
template <typename T> using ordered_set =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
const ll mod = 1e9 + 7;
const int maxn = 2e5 + 100;
const ll inf = 1e18;

//Main CODE :/\

ll a[maxn];
int main() {
    _Sync
    ll n;
    cin >> n;
    for (int i = 0; i < n; i++)
        cin >> a[i];
    ll x , f , xf;
    cin >> x >> f;
    xf = x + f;
    ll ans = 0;
    for (int i = 0; i < n; i++){
        ans += (a[i] / xf) * f;
        if (a[i] % xf > x)
            ans += f;
    }
    cout << ans << "\n";
    return 0;
}
//The_End
//Game Over :D
