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