#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
using ll=long long;

int main() {
	int n,minv=1e9,count=0;
	cin >> n;
	vector<int>a(n);
	ll sum = 0;
	for (int i = 0; i < n; ++i) {
		cin >> a[i];
		sum += abs(a[i]);
		if (a[i] < 0)++count;
		minv = min(minv, abs(a[i]));
	}
	cout << sum - (count % 2 == 1) * minv * 2 << endl;
	return 0;
}