In an electronics supermarket, a discount system is in place: if you buy one item, you pay the full price. If you purchase two items, you get a discount on the cheaper item. For three items, the cheapest one is free. Determine the minimum amount you need to pay when buying items, given that the prices of these items in hryvnias are listed in the array C_{1..N}.
The first line contains the integer (1 \leq N \leq 100). The second line contains integers representing the array C_{1..N}, where each value is a natural number not exceeding .
Output the total cost of the purchase in standard monetary format.
Example 1