Task
We define the function Grandi(v,n) (where v is an array and n is the number of elements of v) as follows:
Grandi(v,n)=i=1∑nvi⋅(−1)i+1=v1−v2+v3−v4+v5−…±vn.
For example: Grandi([1,2,3,4,5],5)=1−2+3−4+5=3.
You are given n and an array v1,v2,…,vn. Rearrange the elements of the array v in such a way that Grandi(v,n) is maximized.
The first line of input contains a single integer n (1≤n≤105) - the length of array v.
The second line contains n space separated integers v1,v2,…,vn (−109≤vi≤109) - the elements of array v.
Output data
Print a single number, representing the maximum possible value of Grandi(v,n) after optimally rearranging the elements of v.
Example 1
stdin
4
5 9 10 2
stdout
12
Explanation
One of the optimal rearrangements of v is [9,5,10,2], as Grandi([9,5,10,2],4)=9−5+10−2=12.
Example 2
stdin
5
3 2 1 4 5
stdout
9
Explanation
One of the optimal rearrangements of v is [4,1,5,2,3], as Grandi([4,1,5,2,3],5)=4−1+5−2+3=9.