#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, n, cnt = -1, x, f, ans = 0, rem = 0;
  cin >> n;
  long long int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  cin >> x >> f;
  b = x + f;
  for (int i = 0; i < n; i++)
    if (arr[i] > x)
      ans += ((arr[i] - x) / b + (long long int)((arr[i] - x) % b != 0)) * f;
  cout << ans;
}
