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