#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e9 + 7;
const int base = 1e9;
const int MAX = 1e6 + 2;
const double EPS = 1e-9;
const double PI = acos(-1.);
int main() {
  int n;
  cin >> n;
  vector<long long> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  long long f, x;
  cin >> x >> f;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    sum += (v[i] / (x + f)) * f;
    v[i] %= (x + f);
    if (v[i] > x) sum += f;
  }
  cout << sum;
  return 0;
}
