Discount
In the supermarket there is an action — "Buying any two goods, the third you receive free of charge, out of three selected goods you pay the two most expensive."
Mamed, going to the supermarket, knows what goods he wants to buy, and knows their value. Determine the minimum amount of money that he needs to take with him to buy these goods.
Input
The first line contains one number . Second line contains numbers — the prices of goods chosen by Mamed. All prices are positive integers, no more than .
Output
Print one number — the minimum amount of money that Mamed should take with him to the supermarket.
Examples
Mamed will first pass through the cash register with goods worth and — will pay rubles and a commodity worth will receive as a gift, and then again go into supermarket and will buy goods worth and , another product of cost received as a gift.