#include <bits/stdc++.h>
using namespace std;
long long n;
long long constexpr MAXN = 200009;
array<long long, MAXN> a;
long long x, f;
void read_input() {
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  cin >> x >> f;
}
decltype(0) main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  read_input();
  long long ans = 0;
  for (long long i = 1; i <= n; i++) {
    long long val = a[i];
    if (val <= x) continue;
    long long cnt = val / (x + f);
    ans += cnt * f;
    val %= (x + f);
    if (val > x) {
      ans += f;
    }
  }
  cout << ans << endl;
  return 0;
}
