[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reada f = stdin.ReadLine().Split() |> Array.map f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

[<EntryPoint>]
let main _ =
    let N = read int64
    let AS = reads int64

    let negs =
        List.filter (fun x -> x < 0L) AS
        |> List.length

    if negs % 2 = 0 then
        printfn "%i" (List.sumBy abs AS)
    else
        let x :: xs =
            List.map abs AS
            |> List.sort
        printfn "%i" (List.sum xs - x)
    0