main = do
  li <- getLine
  let n = read li
  li <- getLine
  let as = map read $ words li
  let ans = compute n as
  putStrLn $ unwords $ map show ans

{-
A1 = x1 + x2
A2 =      x2 + x3
A3 =           x3 + x4
:
AN =                   xN + x1
交互に+-していくとNは奇数だから最後はプラスで
A1 - A2 + A3 - ... + AN = xN + xN = 2x1
-}

compute :: Int -> [Int] -> [Int]
compute n as = map (2 *) $ init $ scanl (flip (-)) x1 as
  where
    x1 = (flip div 2) $ sum $ zipWith ($) (cycle [id,negate]) as
