use std::io; fn main() { let mut input1 = String::new(); let mut input2 = String::new(); io::stdin().read_line(&mut input1).unwrap(); let mut input1 = input1.trim().split_whitespace(); let k: i32 = input1.next().unwrap().parse().unwrap(); let n: i32 = input1.next().unwrap().parse().unwrap(); let f: u32 = input1.next().unwrap().parse().unwrap(); io::stdin().read_line(&mut input2).unwrap(); let mut ages = input2.trim().split_whitespace(); let mut num_beans: i32 = k * n; for _ in 0..f { num_beans -= ages.next().unwrap().parse::().unwrap(); if num_beans < 0 { println!("-1"); return; } } println!("{}", num_beans); }