N=int(input()) b=[int(i) for i in input().split()] m=sum(b) p=[m-n*(N-1) for n in b] print(*p)