#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
priority_queue<int, vector<int>, greater<int> > pq;
vector<int> v;
int vec[200000];
int main() {
  int n;
  scanf("%d", &n);
  long long t, ans = 0;
  int f, x;
  for (int i = 0; i < n; i++) scanf("%d", &vec[i]);
  scanf("%d %d", &f, &x);
  int k = x + f;
  for (int i = 0; i < n; i++) {
    vec[i] -= f;
    t = vec[i] / k;
    if (vec[i] % k) t += 1;
    if (vec[i] <= 0) t = 0;
    ans += max(t * x, 0LL);
  }
  printf("%lld", ans);
}
