fn read() -> (usize, Vec) { let mut s = String::new(); use std::io::*; std::io::stdin().read_to_string(&mut s).unwrap(); let mut it = s.trim().split_whitespace(); let n: usize = it.next().unwrap().parse().unwrap(); (n, it.flat_map(|s| s.parse()).collect()) } fn main() { let (n, a) = read(); assert!(1 <= n && n <= 10); assert!(a.len() == n - 1 && a.iter().all(|a| *a <= 100)); let mut ans = 0; for i in 0..=100 { let sum = a.iter().sum::() + i; if sum % n == 0 { ans += 1; } } println!("{}", ans); }