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 \leq N \leq 200\,000$) representing total number of public addresses Alice has.

Next line contains $N$ integer numbers $a_i$ ($1 \leq a_i \leq 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 \leq f < x \leq 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.

Difficulty: MEDIUM

Solutions:
def g(q, x, f, a):
	if (a + q - 1) // q - (q - 1) * f <= x:
		return True
	else:
		return False
s = input()
n = int(s)
s = input()
y = s.split()
s = input()
s = s.split()
x = int(s[0])
f = int(s[1])
ans = 0
for i in y:
	ans += (int(i) + f - 1) // (x + f)
print(ans * f)


import math
n = int(input())
l = list(map(int, input().split()))
(x, f) = map(int, input().split())
total = 0
for j in range(n):
	if l[j] > x:
		total += math.ceil((l[j] - x) / (x + f))
print(total * f)


n = int(input())
tab = list(map(int, input().split()))
(p, f) = map(int, input().split())
wyn = 0
for x in tab:
	diff = int(x / (p + f))
	if x % (p + f) > p:
		diff += 1
	wyn += diff * f
print(wyn)


import math
NN = int(input())
AI = list(map(int, input().split()))
(XX, FF) = list(map(int, input().split()))
length = len(AI)
extra = 0
for xx in AI:
	if xx > XX:
		extra += math.ceil((xx - XX) / (XX + FF))
print(extra * FF)


import math
input()
a = list(map(int, input().split()))
(x, y) = list(map(int, input().split()))
s = 0
for i in a:
	if i > x:
		s += math.ceil((i - x) / (x + y))
print(int(s * y))


n = int(input())
l = list(map(int, input().split()))
(x, f) = map(int, input().split())
c = 0
for i in l:
	y = i - x
	if y > 0:
		a = y // (x + f)
		b = y / (x + f)
		if a == b:
			c = c + a
		else:
			c = c + a + 1
print(f * c)


import bisect
import math
n = int(input())
vallet = []
vallet = list(map(int, input().strip().split()))
(maxst, fee) = list(map(int, input().strip().split()))
vallet.sort()
index = bisect.bisect(vallet, maxst)
numsplit = 0
for i in range(index, len(vallet)):
	numsplit += math.ceil(float(vallet[i] - maxst) / (maxst + fee))
print(numsplit * fee)


import math
n = int(input())
ch = input().split()
a = list()
for i in range(n):
	a.append(int(ch[i]))
ch = input().split()
max1 = int(ch[0])
fee = int(ch[1])
a.sort(reverse=True)
result = 0
for i in range(n):
	if a[i] <= max1:
		break
	k = a[i] + fee
	result += math.ceil(k / (fee + max1)) - 1
print(result * fee)


import math
n = int(input())
a = list(map(int, input().split()))
s = 0
(m, f) = map(int, input().split())
for i in a:
	if i > m:
		s += math.ceil((i - m) / (f + m)) * f
print(s)


n = int(input())
a = list(map(int, input().split()))
(max, fee) = map(int, input().split())
total = 0
a.sort(reverse=True)
for i in range(n):
	if a[i] > max:
		num = -(-(a[i] - max) // (max + fee))
		total = total + fee * num
	else:
		break
print(total)


from math import ceil

def problem(in1, in2, in3):
	n = int(in1)
	balances = list(map(int, in2.split()))
	limit = list(map(int, in3.split()))[0]
	fee = list(map(int, in3.split()))[1]
	tx_size = limit + fee
	tx_count = 0
	for (index, balance) in enumerate(balances):
		tx_needed = ceil((balance - limit) / tx_size)
		tx_count += tx_needed
	return tx_count * fee
in1 = input()
in2 = input()
in3 = input()
result = problem(in1, in2, in3)
print(result)


N = int(input())
a = [int(i) for i in input().split()]
(x, f) = [int(i) for i in input().split()]
cost = int(0)
for i in range(N):
	if a[i] % (x + f) > x:
		extra = a[i] // (x + f) + 1
	elif a[i] % (x + f) <= x:
		extra = a[i] // (x + f)
	a[i] -= (x + f) * extra
	cost += f * extra
print(cost)


n = int(input())
publicAd = list(map(int, input().split(' ')))
(maxx, fee) = list(map(int, input().split(' ')))
count = 0
for temp in publicAd:
	if temp > maxx:
		t = (temp - maxx) / (maxx + fee)
		count += 1 + (int(t) if t > 1 else 0)
print(count * fee)


import math
N = int(input())
Koshs = [int(x) for x in input().split()]
(x, f) = map(int, input().split())
count = 0
for money in Koshs:
	if money > x:
		count += math.ceil((money - x) / (x + f)) * f
print(count)


import math
n = int(input())
z = [int(x) for x in input().split(' ')]
(x, f) = [int(x) for x in input().split(' ')]
z = list(map(lambda a: a - x, z))
z = list(filter(lambda a: a > 0, z))
ans = 0
for c in z:
	ans += math.ceil(c / (x + f))
print(ans * f)