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