Discounts
When you visited large shop before New Year, you chose a lot of gifts to relatives and to the friends. If you want to economize the certain quantity of money then two types of pre-New Year discounts can help you which operate in a shop:
1. If you want to buy three commodities you will pay for them as for two dearest of them.
2. If you want to buy four commodities you will pay for them as for three dearest of them.
Thus, you can inite certain commodities in three or four and pay for them less. It is needed to define the least possible sum of money, which will be expended in acquisition of all of gifts. For example, if prices of 5 heel select gifts make: 50, 80, 50, 100, 20, it is possible separately to purchase four first commodities, get a discount for them, and then to purchase a gift which remained for his nominal price. All of purchase will cost 250 monetary items, in place of 300 eventually.
You have to write a task program, which can find the minimum sum of money, which will last their purchase after the costs of all gifts.
Input
The first line contains one integer N (0 ≤ N ≤ 10000). The second line contains N natural numbers. There are costs of gifts. The sum of costs of all gifts is less than 10^9. It is possible to unite not only those commodities which go successively in the input.
Output
Print one integer - the minimum sum of money, for which it is possible to purchase all the gifts.