use std::{collections::*, io::Read}; fn take_token(cin: &mut R) -> String { cin.bytes() .map(|c| c.unwrap() as char) .skip_while(|c| c.is_whitespace()) .take_while(|c| !c.is_whitespace()) .collect::() } #[allow(unused)] macro_rules! scan { ($io:expr => $t:ty) => (take_token(&mut $io).parse::<$t>().unwrap()); ($io:expr => $t:tt * $n:expr) => ((0..$n).map(|_| scan!($io => $t)).collect::>()); ($io:expr => $($t:tt),*) => (($(scan!($io => $t)),*)); } #[allow(unused)] macro_rules! scan_itr { ($io:expr => $t:tt * $n:expr) => ((0..$n).map(|_| scan!($io => $t))); } fn main() { solve(std::io::stdin().lock()) } fn solve(mut cin: R) { let n = scan!(cin => i32); let total = scan_itr!(cin => i64 * n).sum::(); println!("{}", total); }