fn read() -> Vec { fn read_line() -> String { let mut buf = String::new(); std::io::stdin().read_line(&mut buf).unwrap(); buf.trim().to_owned() } let _ = read_line(); read_line() .split_ascii_whitespace() .map(|e| e.parse().unwrap()) .collect() } fn main() { let a = read(); println!("{}", a.iter().sum::()); }