f=lambda:map(int,input().split())
n,x=f()
*s,=f()
print(sum(s)-(n-1)*x)