solve :: [Int] -> Int
solve xs
    | 0 `elem` xs || even (length . filter (< 0) $ xs) = sum . map abs $ xs
    | otherwise = sum (map abs xs) - 2 * minimum (map abs xs)

main = getLine >> getLine >>= print . solve . map read . words
