#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios::sync_with_stdio(false);
  cin.tie(0);
}
int gcd(int a, int b) { return (!b) ? a : gcd(b, a % b); }
void cv(vector<long> a) {
  cout << "--"
       << "\n";
  for (int i = 0; i < (int)a.size(); i++)
    cout << a[i] << " "
         << "\n";
  cout << "//"
       << "\n";
}
bool isPrime(int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i += 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
bool isPal(string str) {
  int l = 0;
  int h = str.size() - 1;
  while (h > l) {
    if (str[l++] != str[h--]) return false;
  }
  return true;
}
int main() {
  fast();
  int n;
  cin >> n;
  vector<long> adr;
  for (int i = 0; i < n; i++) {
    long l;
    cin >> l;
    adr.push_back(l);
  }
  long x, f;
  cin >> x >> f;
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    ans += adr[i] / (x + f);
    adr[i] -= (x + f) * (adr[i] / (x + f));
    if (adr[i] > x) {
      ans++;
    }
  }
  cout << f * ans << "\n";
  return 0;
}
