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