N = int(input()) Y = list(map(int, input().split())) SUM = sum(Y) ansl = [] for y in Y: # N - 1 倍して、SUM から引けばよい ans = SUM - (N - 1)*y ansl.append(ans) print(*ansl)