You are given an array of
integers. Can you arrange the elements in such a way as to maximize
?
Input Specification
The first line will contain the integer
.
The second line will contain integers,
.
Output Specification
Output the maximum value of .
Subtasks
For 4/15 of the marks, .
Sample Input
2
3 2 5 1
Sample Output
5
Comments