#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n;
  cin >> n;
  int a;
  map<long long int, long long int, greater<long long int>> m;
  map<long long int, long long int, greater<long long int>>::iterator it;
  for (int i = 0; i < n; i++) {
    cin >> a;
    m[a]++;
  }
  long long int k, t, p;
  cin >> k >> p;
  long long int c = 0, sum = 0;
  for (it = m.begin(); it != m.end(); it++) {
    t = it->first;
    if (t <= k) break;
    c = 0;
    while (t > k) {
      c += p;
      t -= k + p;
    }
    sum += c * (it->second);
  }
  cout << sum;
  return 0;
}
