With the purpose of fight against a shadow economy a bank inculcated merging of the N
accounts of a company into one. For one operation 2 accounts are merged into one and bank automatically takes its own charge fee of Р
% from the new account total for this operation. What is the most funds which could remain on the company' account? Each account has maximum charge of G
UAH before merging.
In the first line we have 2 numbers: amount of accounts and the fee percentage P
.
The second line of N
numbers: the charge of each company' accounts.
Most sum, that can remain on the account.
2 ≤ N ≤ 100000
0 ≤ Р ≤ 20
0 ≤ G ≤ 10000