After finding and moving to the new planet that supports human life, discussions started on which currency should be used. After long negotiations, Bitcoin was ultimately chosen as the universal currency.

These were the great news for Alice, whose grandfather got into Bitcoin mining in 2013, and accumulated a lot of them throughout the years. Unfortunately, when paying something in bitcoin everyone can see how many bitcoins you have in your public address wallet. 

This worried Alice, so she decided to split her bitcoins among multiple different addresses, so that every address has at most x satoshi (1 bitcoin = 10^8 satoshi). She can create new public address wallets for free and is willing to pay f fee in satoshi per transaction to ensure acceptable speed of transfer. The fee is deducted from the address the transaction was sent from. Tell Alice how much total fee in satoshi she will need to pay to achieve her goal.

Input

First line contains number N (1 ≤ N ≤ 200 000) representing total number of public addresses Alice has.

Next line contains N integer numbers a_i (1 ≤ a_i ≤ 10^9) separated by a single space, representing how many satoshi Alice has in her public addresses.

Last line contains two numbers x, f (1 ≤ f < x ≤ 10^9) representing maximum number of satoshies Alice can have in one address, as well as fee in satoshies she is willing to pay per transaction. 

Output

Output one integer number representing total fee in satoshi Alice will need to pay to achieve her goal.

Example

Input

3
13 7 6
6 2


Output

4

Note

Alice can make two transactions in a following way:

0. 13 7 6 (initial state)

1. 6 7 6 5 (create new address and transfer from first public address 5 satoshies)

2. 6 4 6 5 1 (create new address and transfer from second address 1 satoshi)

Since cost per transaction is 2 satoshies, total fee is 4.
#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int MOD2 = 998244353;
vector<int> bases;
const long long int LLINF = 1ll << 60;
const char en = '\n';
void yes() {
  cout << "YES" << en;
  exit(0);
}
void no() {
  cout << "NO" << en;
  exit(0);
}
template <class T>
void prVec(vector<T> w) {
  cout << w.size() << endl;
  for (int i = 0; i < int(w.size()) - 1; ++i) cout << w[i] << ' ';
  cout << w[w.size() - 1] << endl;
}
long long int raand() {
  long long int a = rand();
  a *= RAND_MAX;
  a += rand();
  return a % (MOD - 7);
}
long long int raaand() { return raand() * (MOD - 7) + raand(); }
string to_upper(string a) {
  for (int i = 0; i < (int)a.size(); ++i)
    if (a[i] >= 'a' && a[i] <= 'z') a[i] -= 'a' - 'A';
  return a;
}
string to_lower(string a) {
  for (int i = 0; i < (int)a.size(); ++i)
    if (a[i] >= 'A' && a[i] <= 'Z') a[i] += 'a' - 'A';
  return a;
}
long long int sti(string a) {
  long long int k = 0;
  for (int i = 0; i < (int)a.size(); ++i) {
    k *= 10;
    k += a[i] - '0';
  }
  return k;
}
string its(long long int k) {
  if (k == 0) return "0";
  string a;
  while (k) {
    a.push_back((k % 10) + '0');
    k /= 10;
  }
  reverse(a.begin(), a.end());
  return a;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
template <class T, class K>
pair<T, K> mp(T a, K b) {
  return make_pair(a, b);
}
long long int mult(long long int a, long long int b) { return (a * b) % MOD; }
long long int pot(long long int n, long long int k) {
  if (k == 0) return 1;
  long long int a = pot(n, k / 2);
  a = mult(a, a);
  if (k % 2)
    return mult(a, n);
  else
    return a;
}
long long int divide(long long int a, long long int b) {
  return mult(a, pot(b, MOD - 2));
}
long long int sub(long long int a, long long int b) {
  return (a - b + MOD) % MOD;
}
long long int add(long long int a, long long int b) { return (a + b) % MOD; }
bool prime(long long int a) {
  if (a == 1) return 0;
  for (int i = 2; i <= round(sqrt(a)); ++i) {
    if (a % i == 0) return 0;
  }
  return 1;
}
pair<int, int> has(string first) {
  long long int h1 = 0, h2 = 0;
  first = to_lower(first);
  for (char a : first) {
    h1 *= bases[0];
    h1 += a - 'a';
    h1 %= MOD;
    h2 *= bases[1];
    h2 += a - 'a';
    h2 %= MOD2;
  }
  return make_pair(h1, h2);
}
const int N = 300010;
int n, h[N];
long long int a, b, c;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
int main() {
  ios_base::sync_with_stdio(false);
  srand((long long)new char);
  for (int i = 0; i < 10; ++i) bases.push_back(raand() + 13893829);
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> h[i];
  cin >> a >> b;
  for (int i = 0; i < n; ++i) c += b * ((h[i] + b - 1) / (a + b));
  cout << c;
}
