using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class Program
{
    static int N;
    static long[] A;

    public static void Main(string[] args)
    {
        N = Input.NextInt();
        A = Input.LineLong();

        long ans = 0;
        long abssum = A.Select(n => Math.Abs(n)).Sum();
        long absmin = A.Select(n => Math.Abs(n)).Min();
        if (A.Any(n => n == 0))
        {
            ans = abssum;
        }
        else
        {
            var mcount = A.Count(n => n < 0);
            if (mcount % 2 == 1)
            {
                ans = abssum - absmin - absmin;
            }
            else
            {
                ans = abssum;
            }
        }

        Console.WriteLine(ans);
    }
}

public static class Input
{
    private static Queue<string> q = new Queue<string>();
    private static void Confirm() { if (q.Count == 0) foreach (var s in Console.ReadLine().Split(' ')) q.Enqueue(s); }
    public static int NextInt() { Confirm(); return int.Parse(q.Dequeue()); }
    public static long NextLong() { Confirm(); return long.Parse(q.Dequeue()); }
    public static string NextString() { Confirm(); return q.Dequeue(); }
    public static double NextDouble() { Confirm(); return double.Parse(q.Dequeue()); }
    public static int[] LineInt() { return Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); }
    public static long[] LineLong() { return Console.ReadLine().Split(' ').Select(long.Parse).ToArray(); }
    public static string[] LineString() { return Console.ReadLine().Split(' ').ToArray(); }
    public static double[] LineDouble() { return Console.ReadLine().Split(' ').Select(double.Parse).ToArray(); }
}


public class Modulo
{
    public int M { get; private set; }

    private static readonly List<int> m_facs = new List<int>() { 1, };

    public Modulo(int M = 1000000007)
    {
        this.M = M;
    }

    public int Mul(int a, int b)
    {
        return (int)(Math.BigMul(a, b) % M);
    }

    public int Fac(int n)
    {
        if (m_facs.Count <= n)
        {
            for (int i = m_facs.Count; i <= n; i++)
            {
                var facs_i = Mul(m_facs[i - 1], i);
                m_facs.Add(facs_i);
            }
        }
        return m_facs[n];
    }

    public int Pow(int a, int m)
    {
        switch (m)
        {
            case 0:
                return 1;
            case 1:
                return a;
            default:
                int p1 = Pow(a, m / 2);
                int p2 = Mul(p1, p1);
                return ((m % 2) == 0) ? p2 : Mul(p2, a);
        }
    }

    public int Div(int a, int b)
    {
        return Mul(a, Pow(b, M - 2));
    }

    public int Ncr(int n, int r)
    {
        if (n < r) { return 0; }
        if (n == r) { return 1; }
        int res = Fac(n);
        res = Div(res, Fac(r));
        res = Div(res, Fac(n - r));
        return res;
    }

    public int Plus(int a, int b)
    {
        PlusEq(ref a, b);
        return a;
    }

    public int Minus(int a, int b)
    {
        MinusEq(ref a, b);
        return a;
    }

    public void PlusEq(ref int a, int b)
    {
        a += b;
        a %= M;
    }

    public void MinusEq(ref int a, int b)
    {
        a -= b;
        if (a < 0)
            a += M;
        a %= M;
    }
}

Measured memory_bytes: 29532