fn main() { let n: usize = read(); let a: Vec = read_vec(); let mut sum: usize = 0; for i in 0..n - 1 { sum += a[i]; } let aq: usize = sum / n; let ar: usize = (sum % n + 1) % n; let q: usize = (100 + sum) / n; let r: usize = (100 + sum) % n; if r <= ar { println!("{}", q - aq + 1); } else { println!("{}", q - aq); } } fn read() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() } fn read_vec() -> Vec { read::().split_whitespace() .map(|e| e.parse().ok().unwrap()).collect() }