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