import std; void main() { int n, x; readf("%d %d\n", n, x); const a = readln.split.to!(int[]); writeln(max(a.sum - x, 0)); }