function Main(input){
 input = input.split("\n");
 inputStr = input[0].split(" ");
 var N = Number.parseInt(inputStr[0]);
 var A = input[1].split(" ");
 var i = 0;
 var out = 0;
 var sum = 0;
 var abssum = 0;
 var mainus_cnt = 0;
  
 //console.log(N);
 //console.log(A);  
  
 //負の数が幾つあるか数える
 for ( i = 0 ; i < N; i++) {
   if ( Number.parseInt(A[i]) < 0 ) {
     mainus_cnt += 1;
   }
 }
 console.log(mainus_cnt);
  
 //文字列Aの最後と、そのひとつ前のどちらが絶対値として大きいか判定
 if ( ( mainus_cnt % 2 ) !== 0 ) {
   if ( Math.abs(Number.parseInt(A[N-1])) >= Math.abs(Number.parseInt(A[N-2]))) {
     out = N-2;
   } else {
     out = N-1;
   }
 }
 console.log(out);
  
 //forで回しながら絶対値を足しこむ。
 for ( i=0 ; i<N ; i++) {
   //console.log(i);
   if ( i !== out && out !== 0) {
     abssum = abssum + Math.abs(Number.parseInt(A[i]));
   } else {
     abssum = abssum + Number.parseInt(A[i]);
   }
   //sum = sum + Math.abs(Number.parseInt(A[i]));
 }
 console.log(abssum);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));