macro_rules! input { ($($t:ty),*) => {{ let mut s = String::new(); let _ = std::io::stdin().read_line(&mut s); let mut splits = s.trim().split_whitespace(); ($( {splits.next().unwrap().parse::<$t>().unwrap() },)*)}}} fn main() { let knf = input!(usize,usize, usize); let mut s = String::new(); let _ = std::io::stdin().read_line(&mut s); let mut splits = s.trim().split_whitespace(); let mut sum :usize = 0; for _ in 0..knf.2 { sum += splits.next().unwrap().parse::().unwrap(); } if sum>(knf.0*knf.1) { println!("-1"); } else { println!("{}", knf.0*knf.1-sum); } }