#include <bits/stdc++.h>
using namespace std;
long long int n, i, a[200005], p, f, x, nr;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  cin >> x >> f;
  p = x + f;
  for (i = 1; i <= n; i++) {
    while (a[i] > x) {
      if (a[i] >= p) {
        nr = nr + a[i] / p;
        a[i] = a[i] - a[i] / p * p;
      }
      if (a[i] > x && a[i] < p) {
        nr++;
        a[i] = a[i] - f;
      }
    }
  }
  nr = nr * f;
  cout << nr;
  return 0;
}
