#include <bits/stdc++.h>
using namespace std;
long long a[200005];
int n, m, k;
inline bool check(int mid, int s) {
  return (a[s] - (long long)mid * k - 1) / (mid + 1) + 1 <= m;
}
int main() {
  int x;
  long long s = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  scanf("%d%d", &m, &k);
  for (int i = 1; i <= n; i++) {
    int l = 0, r = a[i], mid, ans = a[i];
    while (l <= r)
      check(mid = l + r >> 1, i) ? r = (ans = mid) - 1 : l = mid + 1;
    s += ans;
  }
  printf("%I64d", s * k);
  return 0;
}
