{-# LANGUAGE ScopedTypeVariables #-}
import Data.Int
import qualified Data.Vector.Unboxed as U
import qualified Data.ByteString.Char8 as BS

readInt :: BS.ByteString -> Int
readInt s = case BS.readInt s of
              Just (x, _) -> x

readInt64 :: BS.ByteString -> Int64
readInt64 s = case BS.readInteger s of
              Just (x, _) -> fromInteger x

main = do
  n <- readInt <$> BS.getLine
  xs :: U.Vector Int64 <- U.fromListN n . map (fromIntegral . readInt) . BS.words <$> BS.getLine
  let negatives = U.filter (<= 0) xs
  if even (U.length negatives)
    then print $ U.sum $ U.map abs xs
    else let abss = U.map abs xs
             mn = U.maximum abss
         in print $ (U.sum abss) - 2 * U.minimum abss
