import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    n <- getInt
    as <- getIntList
    let z = 0 `elem` as
        ms = filter (< 0) as
        m = length ms
        ans | z || even m = sum $ map abs as
            | odd m = 2 * (maximum ms) + sum (map abs as)
    print ans