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