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