#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
#pragma GCC diagnostic ignored "-Wsign-compare"
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  long long first, f;
  cin >> first >> f;
  sort(a.begin(), a.end());
  long long ret = 0;
  while (!a.empty() and a.back() > first) {
    long long cur = a.back();
    a.pop_back();
    long long gps = cur / (f + first);
    ret += gps * f;
    if ((cur % (f + first)) > first) {
      ret += f;
    }
  }
  cout << ret << endl;
  return 0;
}
