import qualified Data.ByteString.Char8 as C
import qualified Data.Vector.Unboxed as V

main = C.interact $ put . sol . get

get = V.unfoldr (C.readInt . C.dropWhile (<'0'))

put = C.pack . unwords . map show . V.toList

sol v = V.generate n ((u V.!) . f)
  where
  n = V.head v
  u = V.tail v
  f i = abs (2*i-n) - if i<(n+1) `div` 2 then 1 else 0