N = int(input()) y = list(map(int,input().split())) S = sum(y) for i in y: print(S - i * (N-1),end=' ') print()