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