#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (!a) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
void sout() { cout << "\n"; }
template <typename T, typename... Types>
void sout(T var1, Types... var2) {
  cout << var1 << " ";
  sout(var2...);
}
template <typename T>
void sout(vector<T> arr) {
  for (auto it : arr) {
    cout << it << " ";
  }
  sout();
}
long long fun(long long n, long long x, long long f) {
  long long temp = n / (x + f);
  long long ans = n % (x + f);
  if (ans > x) {
    temp++;
  }
  return temp;
}
void test_case() {
  long long n;
  cin >> n;
  vector<long long> arr(n);
  for (auto &it : arr) {
    cin >> it;
  }
  long long x, f;
  cin >> x >> f;
  long long ans = 0;
  for (auto it : arr) {
    long long req = fun(it, x, f);
    ans += req * f;
  }
  cout << ans;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
  long long t = 1;
  while (t--) {
    test_case();
  }
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
}
