N=int(input()) Y=list(map(int,input().split())) S=sum(Y) print(*[S-(N-1)*y for y in Y])