The cost of adding two numbers is equal to their sum. For example, to add to , you need to pay . The task is to add all the given numbers in such a way as to minimize the total cost.
For example, adding the numbers , , and can be done in three ways:
1 + 2 = 3 (cost ), 3 + 3 = 6 (cost ). Total
1 + 3 = 4 (cost ), 2 + 4 = 6 (cost ). Total
2 + 3 = 5 (cost ), 1 + 5 = 6 (cost ). Total
The first method is the cheapest.

The first line contains a positive integer n~(2 \le n \le 10^5). The second line contains non-negative integers, each not exceeding 10^5.
Print the minimum cost of adding all the numbers.
Example 1