n=int(input()) y=[*map(int,input().split())] s=sum(y) print(*[s-(n-1)*i for i in y],sep=' ')