#include <bits/stdc++.h>
using namespace std;
long long n, k, a[200001], p = 0, f, x;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  cin >> x >> f;
  for (int i = 1; i <= n; i++) {
    if (a[i] > x) {
      long long t = x + f;
      p += (a[i] / t) + ((a[i] % t) > x);
    }
  }
  cout << p * f << "\n";
  return 0;
}
