#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, a[200006], x, f, ans = 0, i;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  cin >> x >> f;
  ans = 0;
  for (i = 1; i <= n; i++) {
    if (a[i] <= x) continue;
    if ((a[i] - x) % (x + f) == 0)
      ans += (a[i] - x) / (x + f);
    else
      ans += (a[i] - x) / (x + f) + 1;
  }
  cout << ans * f;
}
