N, X = map(int, input().split()) SUM = sum(list(map(int, input().split()))) print(X + SUM - N * X)