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