N, K = map(int, input().split()) A = list(map(int, input().split())) ans = 0 for a in A: ans += K - a kouho = K - ans print(kouho)