function setUp(input) {
  input = input.split("\n");
  N = Number(input[0]);
  AList = input[1].split(" ").map(function (d, i) {
    return Number(d);
  })
  main();
}
function main() {
  lastMinus = undefined;
  minusCount = 0;
  zeroCount = 0
  AList.forEach(function (d, i) {
    if (d < 0) {
      lastMinus = i;
      minusCount++;
    } else if (d === 0) {
      zeroCount++;
    }
  });
  if (lastMinus === N - 1 || lastMinus === undefined || zeroCount > 0 || minusCount % 2 === 0) {
    var num = 0;
    AList.forEach(function (d, i) {
      num += Math.abs(d);
    })
    console.log(num);
    return
  }
  var num = 0;
  AList.forEach(function (d, i) {
    if (i < lastMinus) {
      num += Math.abs(d);
    }
  });
  Alist = AList.slice(lastMinus).map(function (d, i) {
    return Math.abs(d);
  });
  Alist.sort(function (a, b) {
    return a - b;
  })
  Alist.forEach(function (d, i) {
    if (i !== 0) {
      num += d;
    } else {
      num -= d;
    }
  });
  console.log(num);
}

setUp(require("fs").readFileSync("/dev/stdin", "utf8"));
// setUp('3\n-10 5 -4')
// setUp('5\n10 -4 -8 -11 3')
// setUp('11\n-1000000000 1000000000 -1000000000 1000000000 -1000000000 0 1000000000 -1000000000 1000000000 -1000000000 1000000000')