def main(): n, x = map(int, input().split()) print(sum(map(int, input().split())) - (n - 1) * x) main()