package main import ( "bufio" "fmt" "os" "strconv" ) func main() { var k, n, f int fmt.Scan(&k, &n, &f) a := make([]int, f) sc := bufio.NewScanner(os.Stdin) sc.Split(bufio.ScanWords) ans := k * n for i := range a { sc.Scan() a[i], _ = strconv.Atoi(sc.Text()) ans -= a[i] if ans < 0 { fmt.Println(-1) return } } fmt.Println(ans) }