#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9 + 7;
priority_queue<long long> pq;
int32_t main(void) {
  ios::sync_with_stdio(0);
  long long n;
  cin >> n;
  long long a[n], x, f;
  for (long long(i) = 0; i < (n); i++) {
    cin >> a[i];
    pq.push(a[i]);
  }
  cin >> x >> f;
  long long cesstopay = 0, fee = 0, is = 0;
  while (pq.size()) {
    if (pq.top() <= x) break;
    fee += f * ((pq.top() - x) / (x + f) + ((pq.top() - x) % (x + f) != 0));
    pq.pop();
  }
  cout << fee;
  return 0;
}
