main :: IO ()
main = do
  getLine
  as <- map read . words <$> getLine
  print $ solve as

solve :: [Int] -> Int
solve as
  | odd n_nonneg = sum abs_as - 2 * minimum abs_as
  | otherwise    = sum abs_as
  where
    n_nonneg = length $ filter (<= 0) as
    abs_as = abs <$> as