use std::io::{self, BufReader, BufWriter, Read, Write}; fn main() { let stdin = io::stdin(); let mut stdin = BufReader::new(stdin.lock()); let stdout = io::stdout(); let mut stdout = BufWriter::new(stdout.lock()); let mut buf = String::new(); stdin.read_to_string(&mut buf).unwrap(); let mut iter = buf.split_whitespace(); let k: u32 = iter.next().unwrap().parse().unwrap(); let n: u32 = iter.next().unwrap().parse().unwrap(); let f: usize = iter.next().unwrap().parse().unwrap(); let num = k * n; let eat_num: u32 = (0..f) .map(|_| iter.next().unwrap().parse::().unwrap()) .sum(); if num < eat_num { stdout.write(b"-1").unwrap(); } else { writeln!(&mut stdout, "{}", num - eat_num).unwrap(); } }