#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  priority_queue<long long> queue;
  for (long long i = 0; i < n; i++) {
    long long tmp;
    cin >> tmp;
    queue.push(tmp);
  }
  long long x, f;
  cin >> x >> f;
  long long ans = 0;
  while (!queue.empty()) {
    long long temp = queue.top();
    queue.pop();
    if (temp <= x) {
      break;
    }
    ans += temp / (x + f);
    if (temp % (x + f) > x) {
      ans++;
    }
  }
  cout << ans * f;
  return 0;
}
