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