import Data.List

main = do
    getLine
    xs <- map (read :: String -> Integer) . words <$> getLine
    if even $ length $ filter (< 0) xs
        then print $ sum $ map abs xs
        else print $ sum (tail (sort $ map abs xs)) - minimum (map abs xs)
