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