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