"use strict"

function Main(input) {
  input = input.split('\n');
  let N = parseInt(input.shift());
  let array = input.shift().split(/\s/).map(value => value - 0);
  let result = 0;
  let min = Math.abs(array[0]);
  let count = 0;
  for(let i=0;i<N;i++){
    let tmp = array[i];
    if(tmp > 0){
      result += tmp;
      min = Math.min(tmp, min);
    } else {
      result -= tmp;
      min = Math.min(-tmp, min);
      count++;
    }
  }
  if(count % 2 == 1) {
    result -= 2*min;
  }
  console.log(result);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
