f=lambda:map(int,input().split()) N,X=f() n=sum(f())-X*N+X print(n)