N, X = map(int, input().split()) A = list(map(int, input().split())) Y = sum(A) Z = Y - X print(Z)