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
    getLine
    as <- getIntList
    let x1 = (`div` 2) . sum $ zipWith (*) (cycle [1, -1]) as
    let ans = map (2*) $ scanl' (\a b -> b - a) x1 (init as)
    putStrLn . unwords $ map show ans