#include <bits/stdc++.h>
using namespace std;
int solution() {
  int n;
  cin >> n;
  long a[n];
  for (long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long f, x;
  cin >> x >> f;
  long long fi = 0;
  for (long i = 0; i < n; i++) {
    if (a[i] <= x) continue;
    int t = a[i] - x;
    t = ceil((double)t / (x + f));
    if (a[i] - t * (x + f) > x) t++;
    fi += t;
  }
  cout << fi * f;
  return 0;
}
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solution();
}
