let s, b, m = Array.fold_left (fun (s, b, m) x -> (s + abs x, b <> (x < 0), min m (abs x))) (0, false, 1000000000) (Array.init (read_int()) (fun _ -> Scanf.scanf " %d" (fun i -> i))) in print_int (s + if b then -2 * m else 0)
