Metro
InterviewTime limit2sMemory limit1024 MB
Given n cards with balances a_i and p extra burles to distribute, find the maximum number of metro rides at fee k per ride.
Statement
Pafnutiy wants to use the metro to reach his destination.
To pass through a turnstile, he must use a special SLON card (Subterranean Lowcost Orientational Network). Each card has a non-negative integer balance, the number of burles recorded on it. If a card has at least burles, it can pass the turnstile, and its balance then decreases by . If the balance is less than , the card cannot be used for the turnstile.
Initially, Pafnutiy has cards, and card has balance . He has also saved burles and can distribute this money among the cards in any way. Formally, if he adds burles to card , then must hold. Money cannot be moved between cards. A card balance grows only from part of these burles and shrinks only when the card passes the turnstile.
Find the maximum number of times Pafnutiy can ride the metro if he distributes the burles optimally.
Input
The first line contains three integers , , and (, , ): the number of cards, the saved amount, and the fee for one passage.
The second line contains integers (): the card balances.
Output
Print one integer: the maximum number of times Pafnutiy can ride the metro.
Hint
In the first example, Pafnutiy can initially ride only 3 times. But if he adds 1 burle to the first, second, or third card, he can ride 4 times.
In the second example, 1000 burles are only enough to bring the balances of both cards to 2000 burles.