#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long a[n + 1];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long x, f, curr, count = 0;
  cin >> x >> f;
  for (int i = 0; i < n; i++) {
    curr = a[i];
    if (curr >= x + f) {
      a[n] = curr / (x + f);
      curr = curr % (x + f);
      count += (a[n]) * f;
    }
    if (curr > x) count += f;
  }
  cout << count << endl;
  return 0;
}
