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]
#include <bits/stdc++.h>
using namespace std;
const int Maxn = 200005;
const long long Inf = 4000000000000000000ll;
int n;
long long dp[Maxn][3][2][2];
int getJ(int old, int nw) {
  if (nw == 0)
    if (old == 0)
      return 1;
    else if (old == 1)
      return 2;
    else
      return 0;
  else if (old == 0)
    return 2;
  else if (old == 1)
    return 0;
  else
    return 1;
}
int main() {
  scanf("%d", &n);
  int a;
  scanf("%d", &a);
  if (n == 1) {
    printf("%d\n", a);
    return 0;
  }
  fill((long long*)dp, (long long*)dp + Maxn * 3 * 2 * 2, -Inf);
  dp[1][1][1][0] = a;
  dp[1][0][0][0] = -a;
  for (int i = 1; i < n; i++) {
    scanf("%d", &a);
    for (int j = 0; j < 3; j++)
      for (int l = 0; l < 2; l++)
        for (int k = 0; k < 2; k++) {
          int nj = getJ(j, 0);
          int nl = 0;
          int nk = (k == 1 || l == 0);
          dp[i + 1][nj][nl][nk] =
              max(dp[i + 1][nj][nl][nk], dp[i][j][l][k] - a);
          nj = getJ(j, 1);
          nl = 1;
          nk = (k == 1 || l == 1);
          dp[i + 1][nj][nl][nk] =
              max(dp[i + 1][nj][nl][nk], dp[i][j][l][k] + a);
        }
  }
  printf("%I64d\n", max(dp[n][1][0][1], dp[n][1][1][1]));
  return 0;
}
