#include <bits/stdc++.h>
using namespace std;
const long long int N = 200005;
const long long int mod = 119 << 23 | 1;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int pow(long long int a, long long int b, long long int c) {
  long long int res = 1;
  while (b) {
    if (b & 1) res = (res * a) % c;
    b = b >> 1;
    a = (a * a) % c;
  }
  return res;
}
long long int t;
long long int n;
long long int x, f;
long long int a[N];
long long int ans;
long long int cal(long long int val) {
  long long int temp = 0;
  long long int s = 0;
  long long int e = val;
  if (val <= x) {
    return 0;
  }
  while (s < e) {
    long long int mid = (s + e) / 2;
    if (val - mid * f <= x * (mid + 1)) {
      e = mid;
    } else {
      s = mid + 1;
    }
  }
  temp = s * f;
  return temp;
}
void solve() {
  cin >> n;
  ans = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  cin >> x >> f;
  for (long long int i = 0; i < n; i++) {
    ans += cal(a[i]);
  }
  cout << ans << endl;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
