GSS

After defeating all the PokeMasters, you feel hungry... for Toblerone bars! You pass by a PokeMart on the way to Cerulean City to see the beautiful Misty and you see many different Toblerone bars of different flavours that you want to buy. You decide that you should give yourself a treat and buy all the Toblerones that are sold in the shop. But now that there's a Great PokeMart Sale, the candy shop is offering a discount: Buy 4 Toblerone bars and get the one with the least cost of the 4 free.

Using this information, you want to find out what is the minimum cost you have to pay to buy all the Toblerones in the shop.

Input

The first line gives the number of Toblerone bars in the shop, n where 1 ≤ n ≤ 100.

The next line contains n integers representing the price of each Toblerone.

Output

Output the minimum total price by selectively choosing which items to bring to the counter at the same time.

Sample Input

4
300 200 100 400

Sample Output

900

Time Limit: 1 Seconds
Memory Limit: 256MB
Your best score: 0
Source: Dunjudge Archive

Subtask Score
1 100
2 0