1421_E. Swedish Heroes
While playing yet another strategy game, Mans has recruited n [Swedish heroes](https://www.youtube.com/watch?v=5sGOwFVUU0I), whose powers which can be represented as an array a.

Unfortunately, not all of those mighty heroes were created as capable as he wanted, so that he decided to do something about it. In order to accomplish his goal, he can pick two consecutive heroes, with powers a_i and a_{i+1}, remove them and insert a hero with power -(a_i+a_{i+1}) back in the same position. 

For example if the array contains the elements [5, 6, 7, 8], he can pick 6 and 7 and get [5, -(6+7), 8] = [5, -13, 8].

After he will perform this operation n-1 times, Mans will end up having only one hero. He wants his power to be as big as possible. What's the largest possible power he can achieve?

Input

The first line contains a single integer n (1 ≤ n ≤ 200000).

The second line contains n integers a_1, a_2, …, a_n (-10^9 ≤ a_i ≤ 10^9) — powers of the heroes.

Output

Print the largest possible power he can achieve after n-1 operations.

Examples

Input


4
5 6 7 8


Output


26


Input


5
4 -5 9 -2 1


Output


15

Note

Suitable list of operations for the first sample:

[5, 6, 7, 8] → [-11, 7, 8] → [-11, -15] → [26]
```python
n = int(input())
a = list(map(int,input().split()))
INF = 10 ** 20
DP = [-INF] * 12
DP[1] = a[0]
DP[5] = -a[0]
for elem in a[1:]:
    newDP = []
    newDP.append(DP[5] + elem)
    newDP.append(DP[3] + elem)
    newDP.append(DP[4] + elem)
    newDP.append(DP[1] - elem)
    newDP.append(DP[2] - elem)
    newDP.append(DP[0] - elem)
    newDP.append(max(DP[2] + elem, DP[8] + elem, DP[11] + elem))
    newDP.append(max(DP[0] + elem, DP[6] + elem, DP[9] + elem))
    newDP.append(max(DP[1] + elem, DP[7] + elem, DP[10] + elem))
    newDP.append(max(DP[4] - elem, DP[7] - elem, DP[10] - elem))
    newDP.append(max(DP[5] - elem, DP[8] - elem, DP[11] - elem))
    newDP.append(max(DP[3] - elem, DP[6] - elem, DP[9] - elem))
    DP = newDP
if n == 1:
    print(a[0])
else:
    print(max(DP[7],DP[10]))
    
```