(* O(n) *)
let solve n a_s =
  let abs_s = List.map abs a_s in
  let mi = List.fold_left min max_int abs_s in
  let sum = List.fold_left (+) 0 abs_s in
  if mi = 0 then
    sum
  else
    let neg_count = List.fold_left (fun acc a -> if a < 0 then acc + 1 else acc) 0 a_s in
    if neg_count mod 2 = 0 then
      sum
    else
      sum - mi * 2

let read_ints () = read_line () |> Str.split (Str.regexp " ") |> List.map int_of_string
let _ =
  let n = read_int () in
  read_ints () |> solve n |> string_of_int |> print_endline