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