n, x = read_line.split.map(&.to_i) puts [read_line.split.map(&.to_i).sum - x, 0].max