n, x = map(int, input().split()) print(max(0, sum(map(int, input().split())) - x))