N,X = map(int,input().split()) S = list(map(int,input().split())) pre_A = [X-S[i] for i in range(N)] wrong_A = sum(pre_A) print(X-wrong_A)