N, X = map(int, input().split()) S = map(int, input().split()) print(sum(S) - X * (N - 1))