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