#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 13;
long long a[maxn];
long long f, x;
int n;
long long ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
  scanf("%lld%lld", &x, &f);
  for (int i = 1; i <= n; i++) {
    int now = a[i] / (f + x);
    a[i] -= now * (f + x);
    ans += now;
    while (a[i] > x) a[i] -= f, a[i] -= x, ans++;
  }
  printf("%lld", ans * f);
  return 0;
}
