use proconio::input; fn main(){ input!{ n: usize, x: i32, a: [i32; n], } let s = a.iter().sum::(); println!("{}", (s-x).max(0_i32)); }