#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll md = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (ll i = 0; i < n; i++) {
    cin >> a[i];
  }
  ll x, f;
  cin >> x >> f;
  ll ans = 0;
  for (ll i = 0; i < n; i++) {
    ll cur = a[i];
    if (a[i] <= x) {
      continue;
    } else {
      cur -= x;
      ans += (cur + x + f - 1) / (x + f);
    }
  }
  ans *= f;
  cout << ans << '\n';
  return 0;
}
