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