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]
import java.io.*; import java.util.*;
public class CF1421E {
    //See analysis
    public static class Pair implements Comparable<Pair>{
        int ind; long val;
        public Pair(int a, long b){
            this.ind=a; this.val=b;
        }
        public int compareTo(Pair other){
            if(this.val<other.val)return -1;
            if(this.val>other.val)return 1;
            if(this.ind>other.ind)return 1;
            return -1;
        }
    }
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        int N=Integer.parseInt(br.readLine());
        StringTokenizer st=new StringTokenizer(br.readLine());
        Pair[] a=new Pair[N]; int pos1=0;
        for (int i = 0; i < N; i++) {
            a[i]=new Pair(i,Integer.parseInt(st.nextToken()));
            if(a[i].val<=0){
                pos1++;
            }
        }
        if(N==1){
            System.out.println(a[0].val);return;
        }
        Arrays.sort(a);boolean[] b=new boolean[N];
        long ans=0;
        long mincost=0;
        if((pos1+N)%3==1){
            
            for (int i = 0; i < N; i++) {
                if(a[i].val>0){
                    b[a[i].ind]=true;
                }
            }
            boolean alt=true;
            for (int i = 1; i < N; i++) {
                if(b[i]==b[i-1]){
                    alt=false; break;
                }
            }
            for (int i = 0; i < N; i++) {
                  ans+=Math.abs(a[i].val);
             }
            if(alt){
                mincost=a[pos1].val-a[pos1-1].val;
                if(pos1>=3){
                    mincost=Math.min(mincost,Math.abs(a[pos1-1].val+a[pos1-2].val+a[pos1-3].val));
                }
                if(N-pos1>=3){
                    mincost=Math.min(mincost,Math.abs(a[pos1].val+a[pos1+1].val+a[pos1+2].val));
                }
                ans-=(2*mincost);
            }
        }else{
            //First consider more minuses
            //Then consider the case w/ more pluses and one swap
            while((pos1+N)%3!=1){
                pos1--;
            }
            
            boolean sm=false;
            if(pos1<0){
                pos1+=3; sm=true;
            }
            for (int i = 0; i < pos1; i++) {
                ans+=-a[i].val; 
            }
            for (int i = pos1; i < N; i++) {
                ans+=a[i].val;b[a[i].ind]=true;
            }
            boolean alt=true;
            for (int i = 1; i < N; i++) {
                if(b[i]==b[i-1]){
                    alt=false; break;
                }
            }
            if(alt){
                mincost=a[pos1].val-a[pos1-1].val;//Swap
                if(!sm){//m+3
                    mincost=Math.min(mincost,a[pos1].val+a[pos1+1].val+a[pos1+2].val);
                }
                if(pos1>=3){
                    mincost=Math.min(mincost, Math.abs(a[pos1-1].val+a[pos1-2].val+a[pos1-3].val));
                }
                ans-=2*mincost;
            }else{
                if(N-pos1>2){
                    //System.out.println("hi");
                    b[a[pos1].ind]=false; b[a[pos1+1].ind]=false; b[a[pos1+2].ind]=false;
                    long ans2=ans;
                    //System.out.println(ans2);
                    ans2-=a[pos1].val; ans2-=a[pos1+1].val; ans2-=a[pos1+2].val;
                    ans2-=a[pos1].val; ans2-=a[pos1+1].val; ans2-=a[pos1+2].val;
                    alt=true;
                    for (int i = 1; i < N; i++) {
                        if(b[i]==b[i-1]){
                            alt=false; break;
                        }
                    }
                    if(alt){
                        ans2+=a[pos1+2].val; ans2-=a[pos1+3].val;
                        ans2+=a[pos1+2].val; ans2-=a[pos1+3].val;
                        //It is impossible for pos1+3>N if alt is true
                    }
                    
                    ans=Math.max(ans,ans2);
                }
            }
            
        }
        System.out.println(ans);
    }
    
}
//Watch out for overflows (long), special cases!
