#include<algorithm>
#include <iostream>
#include <cstring>
#include <cstdio>
#include <vector>
#include <cmath>
#include <string>
#include <map>
using namespace std;

int main()
{
	int n,negatives=0;
	long long Sum=0,mini=10000000000,tmp;
	cin >>n;
	for(int i=0;i<n;i++){
	    cin >> tmp;
	    mini=min(mini,abs(tmp));
	    if(tmp<0)negatives++;
	    Sum+=abs(tmp);
	}
	Sum-=mini;
	if(negatives %2==1 ) Sum-=mini;
	else Sum+=mini;
	cout <<Sum<<"\n";
	return 0;
}
