n = int(input()) y = list(map(int, input().split())) r = sum(y) print(' '.join([str(r - k * (n - 1)) for k in y]))