process.stdin.resume();
process.stdin.setEncoding('utf8'); 
var lines = [];
var reader = require('readline').createInterface({
	input: process.stdin,
	output: process.stdout
});
 
reader.on('line', (line) => {
	lines.push(line);
});

reader.on('close', () => {
	"use strict"
	const N = +lines[0];
	const A = lines[1].split(" ").map(Number);
	
	const numOfMinus = A.reduce((acc, n) => acc+(n<0), 0);
	const hasZero = A.some(n => n==0);
	const A_abs = A.map(Math.abs);
	let ans;
	if(!hasZero && numOfMinus%2){
		const min = A_abs.reduce((x, y) => Math.min(x,y));
		ans = A_abs.reduce((acc, n) => acc+n, 0) - 2*min;
	} else {
		ans = A_abs.reduce((acc, n) => acc+n, 0);
	}
	
	console.log(ans);
});