module Main where

import Control.Applicative
import Control.Monad
import Data.List

f p (a, b) = p - ((abs a + abs b) - abs (a + b))

main :: IO ()
main = do
    getLine
    as <- fmap read . words <$> getLine :: IO [Int]
    let bs = zipWith (-) (as ++ [0]) (0:as)
    let p = sum $ fmap abs bs
    let cs = zip bs (tail bs)
    mapM_ print $ fmap (f p) cs