Time Limit: 1000 mSec Memory Limit : 32768 KB

As the old saying goes:
### To Realize The Value of Time

To realize the value of ONE YEAR

ask the student who has failed a class

To realize the value of ONE MONTH

ask a mother who gave birth to a premature baby

To realize the value of ONE WEEK

ask the editor of a weekly newspaper

To realize the value of ONE HOUR

ask the lovers who are waiting to meet

To realize the value of ONE MINUTE

ask a person who missed the train

To realize the value of ONE SECOND

ask a person who just avoided accident

To realize the value of ONE MILLISECOND

ask the person who won a silver medel in the Olympics

Treasure every moment that you have!

Yesterday is history.

Tomorrow is mystery.

Today is a gift.

That's why it is called present!

Show your friends how much you care...

To be hero, time is very important. In the International Collegiate Programming Contest(ICPC), the victory of success is half won when one knows how to select the proper order to solve them. Time to solve a problem is calculated from the begining of the contest to the submiting juncture. Hero's mission is minimizing the total time of solving all the problem.

There are multiply testcases. In each testcase, the first line contains an integer n (0<=n<=10000), denotes the number of the problem, the next line contains n integers *X*_{1},X_{2},...,X_{n}, X_{i} denotes the minutes you need to solved *i*th problems [1..300].

For each teatcase, output one line contains an integer which denotes the minimal total time.

4
10 10 30 20

140