n=int(input()) b = list(map(int, input().split())) s = sum(b) ans = [str(s-(n-1)*bi) for bi in b] print(' '.join(ans))