let n = stdin.ReadLine() |> int64
let a : int64 [] = stdin.ReadLine().Split(' ') |> Array.map int64

let z = Array.filter (fun x -> x = 0L) a |> Array.length
let mi = Array.filter (fun x -> x < 0L) a |> Array.length

if z>0 || mi%2=0 then 
    printfn "%d" (Array.map (fun x -> abs x) a |> Array.sum)
else
    let mn = Array.map abs a |> Array.min
    let s = Array.map abs a |> Array.sum
    printfn "%d" (s - mn*2L)
