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