#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int64_t n;
  cin >> n;
  int64_t a[n];
  for (auto& xy : a) cin >> xy;
  int64_t x, f, ans = 0;
  cin >> x >> f;
  for (auto& y : a) {
    if (y >= x + f) {
      ans += (y / (x + f)) * f;
      y -= ((y / (x + f)) * (f + x));
      if (y > x and y < x + f) {
        ans += f;
      }
    } else if (y > x and y < x + f) {
      ans += f;
    }
  }
  cout << ans;
}
