N, K = map(int, input().split()) A = list(map(int, input().split())) S = sum(A) print(S - (N * K - K))