N = int(input()) X = int(input()) A = [int(input()) for _ in range(N)] Y = sum(A) print(Y - X)