#include <bits/stdc++.h>
using namespace std;
const int64_t mod = 1000000007;
int64_t maxm(int64_t a, int64_t b) { return a > b ? a : b; }
int64_t minm(int64_t a, int64_t b) { return a > b ? b : a; }
const int64_t inf = 1e18;
int main() {
  ios_base::sync_with_stdio(false);
  int64_t n, i, x, first, y, ans = 0;
  cin >> n;
  int64_t a[n];
  for (i = 0; i < n; i++) cin >> a[i];
  cin >> x >> first;
  for (i = 0; i < n; i++) {
    if (a[i] > x) {
      ans += a[i] / (x + first);
      if (a[i] % (x + first) > x) ans++;
    }
  }
  cout << ans * first;
}
