package main import ( "fmt" ) func sum(nums ...int) int { // fmt.Print(nums, " ") total := 0 for _, num := range nums { total += num } return total } func main() { var K, N, F int fmt.Scan(&K, &N, &F) var a []int a = make([]int, F) var ans int for i := 0; i < F; i++{ // fmt.Scan(&c) // a = append(a, c) fmt.Scanf("%d", &a[i]) } // fmt.Print(a) // var sum_a int // sum_a = sum(a...) // fmt.Println(sum_a) // fmt.Println(sum(a...)) ans = K * N - sum(a...) if ans >= 0 { fmt.Print(ans) } else { fmt.Print("-1") } }