import std.stdio;
import std.algorithm;
import std.conv;
import std.range;
import std.string;
import std.math;

void main() {
	long n = readln.chomp.to!int;
	long[] as = readln.chomp.split(' ').map!(s => s.to!long).array;
	long negc;
	long amin = long.max;
	long total = 0;
	foreach(a;as){ 
		if (a < 0) --negc;
		amin = min(amin, abs(a));
		total += abs(a);
	}
	if (negc % 2 == 0) {
		write(total);
	}
	else {
		write(total - 2*amin);
	}
}
