N, X = map(int, input().split()) S = [int(a) for a in input().split()] print(sum(S) - X * (N - 1))