main = do
  getLine
  as<-map read.words<$>getLine
  print $ solve as

solve as
  | even negs = sum asabs
  | elem 0 as = sum asabs
  | otherwise = sum asabs - 2 * minimum asabs
  where
  asabs = map abs as
  negs = length $ filter (<0) as