main = do
    n <- getLine
    ls <- map read . words <$> getLine
    print $ answer ls
    where answer i = if   (even . length . filter ((>) 0)) i || elem 0 i
                     then (sum . map abs) i
                     else (sum . map abs) i - 2 * minimum i
